pdarleyjr commited on
Commit
886ef1b
·
1 Parent(s): 727f67b

Enable API mode and configure endpoint for Gradio interface

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -48,10 +48,13 @@ demo = gr.Interface(
48
  allow_flagging="never"
49
  )
50
 
51
- # Launch the app with minimal configuration
52
  if __name__ == "__main__":
53
  demo.queue()
54
  demo.launch(
55
  server_name="0.0.0.0",
56
- server_port=7860
 
 
 
57
  )
 
48
  allow_flagging="never"
49
  )
50
 
51
+ # Launch the app with API configuration
52
  if __name__ == "__main__":
53
  demo.queue()
54
  demo.launch(
55
  server_name="0.0.0.0",
56
+ server_port=7860,
57
+ share=False,
58
+ api_mode=True, # Enable API mode
59
+ api_name="/api/predict" # Set API endpoint name
60
  )