qqwjq1981 commited on
Commit
52668f6
·
verified ·
1 Parent(s): 7e2f004

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1131,9 +1131,10 @@ def create_gradio_interface(state=None):
1131
  # In[21]:
1132
 
1133
  demo = create_gradio_interface()
 
1134
 
1135
- # Mount the Gradio app at a specific path
1136
- app.mount("/gradio", demo, name="gradio")
1137
 
1138
  # Redirect from the root endpoint to the Gradio app
1139
  @app.get("/", response_class=RedirectResponse)
 
1131
  # In[21]:
1132
 
1133
  demo = create_gradio_interface()
1134
+ gradio_app = demo.asgi
1135
 
1136
+ # Mount the Gradio ASGI app at "/gradio"
1137
+ app.mount("/gradio", gradio_app)
1138
 
1139
  # Redirect from the root endpoint to the Gradio app
1140
  @app.get("/", response_class=RedirectResponse)