skibi11 commited on
Commit
06db179
·
verified ·
1 Parent(s): 1471654

Add a block to run the server

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -74,4 +74,9 @@ gradio_ui = gr.Interface(
74
  )
75
 
76
  # --- 7. Mount the Gradio UI onto the FastAPI app's root ---
77
- app = gr.mount_gradio_app(app, gradio_ui, path="/")
 
 
 
 
 
 
74
  )
75
 
76
  # --- 7. Mount the Gradio UI onto the FastAPI app's root ---
77
+ app = gr.mount_gradio_app(app, gradio_ui, path="/")
78
+
79
+ # --- 8. To run the server ---
80
+ if __name__ == "__main__":
81
+ import uvicorn
82
+ uvicorn.run(app, host="0.0.0.0", port=7860)