qqwjq1981 commited on
Commit
06f6136
·
verified ·
1 Parent(s): 2f12e87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1196,13 +1196,13 @@ 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.server_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", demo)
1206
 
1207
  # # create a static directory to store the static files
1208
  # static_dir = Path('./static')