Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1136,6 +1136,10 @@ gradio_asgi_app = gr.routes.App.create_app(demo)
|
|
1136 |
# Mount the Gradio ASGI app at "/gradio"
|
1137 |
app.mount("/gradio", gradio_asgi_app)
|
1138 |
|
|
|
|
|
|
|
|
|
1139 |
# Redirect from the root endpoint to the Gradio app
|
1140 |
@app.get("/", response_class=RedirectResponse)
|
1141 |
async def index():
|
|
|
1136 |
# Mount the Gradio ASGI app at "/gradio"
|
1137 |
app.mount("/gradio", gradio_asgi_app)
|
1138 |
|
1139 |
+
# Mount static files for Gradio assets
|
1140 |
+
gradio_assets_path = os.path.join(os.path.dirname(gr.__file__), "static")
|
1141 |
+
app.mount("/assets", StaticFiles(directory=gradio_assets_path), name="assets")
|
1142 |
+
|
1143 |
# Redirect from the root endpoint to the Gradio app
|
1144 |
@app.get("/", response_class=RedirectResponse)
|
1145 |
async def index():
|