Spaces:
Running
Running
added block 5. To run the server. app.py
Browse files
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)
|