Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1196,13 +1196,14 @@ def create_gradio_interface(state=None):
|
|
1196 |
# In[21]:
|
1197 |
demo = create_gradio_interface()
|
1198 |
# Use Gradio's `server_app` to get an ASGI app for Blocks
|
1199 |
-
gradio_asgi_app = demo.launch(share=False, inbrowser=False, server_name="0.0.0.0", server_port=7860, inline=False)
|
1200 |
|
1201 |
logging.debug(f"Gradio version: {gr.__version__}")
|
1202 |
logging.debug(f"FastAPI version: {fastapi.__version__}")
|
1203 |
|
1204 |
# Mount the Gradio ASGI app at "/gradio"
|
1205 |
-
app.mount("/gradio", gradio_asgi_app)
|
|
|
1206 |
|
1207 |
# # create a static directory to store the static files
|
1208 |
# static_dir = Path('./static')
|
|
|
1196 |
# In[21]:
|
1197 |
demo = create_gradio_interface()
|
1198 |
# Use Gradio's `server_app` to get an ASGI app for Blocks
|
1199 |
+
# gradio_asgi_app = demo.launch(share=False, inbrowser=False, server_name="0.0.0.0", server_port=7860, inline=False)
|
1200 |
|
1201 |
logging.debug(f"Gradio version: {gr.__version__}")
|
1202 |
logging.debug(f"FastAPI version: {fastapi.__version__}")
|
1203 |
|
1204 |
# Mount the Gradio ASGI app at "/gradio"
|
1205 |
+
# app.mount("/gradio", gradio_asgi_app)
|
1206 |
+
gr.mount_gradio_app(app, demo, path="/gradio")
|
1207 |
|
1208 |
# # create a static directory to store the static files
|
1209 |
# static_dir = Path('./static')
|