skibi11 commited on
Commit
dc2c7e9
·
verified ·
1 Parent(s): 9508cdc

added block 5. To run the server. app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -53,4 +53,9 @@ gradio_interface = gr.Interface(
53
 
54
  # --- 4. Create the FastAPI app and mount the Gradio app to it ---
55
  app = FastAPI()
56
- app = gr.mount_gradio_app(app, gradio_interface, path="/")
 
 
 
 
 
 
53
 
54
  # --- 4. Create the FastAPI app and mount the Gradio app to it ---
55
  app = FastAPI()
56
+ app = gr.mount_gradio_app(app, gradio_interface, path="/")
57
+
58
+ # --- 5. To run the server ---
59
+ if __name__ == "__main__":
60
+ import uvicorn
61
+ uvicorn.run(app, host="0.0.0.0", port=7860)