Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -101,4 +101,8 @@ async def recommend_api(request: Request):
|
|
101 |
|
102 |
# === Mount Gradio to FastAPI ===
|
103 |
from gradio.routes import mount_gradio_app
|
104 |
-
|
|
|
|
|
|
|
|
|
|
101 |
|
102 |
# === Mount Gradio to FastAPI ===
|
103 |
from gradio.routes import mount_gradio_app
|
104 |
+
from fastapi.responses import RedirectResponse
|
105 |
+
app = mount_gradio_app(app, gr_interface, path="/gradio")
|
106 |
+
@app.get("/")
|
107 |
+
async def root():
|
108 |
+
return RedirectResponse(url="/gradio")
|