AnshulS commited on
Commit
ea2c373
·
verified ·
1 Parent(s): a3c0b85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
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
- app = mount_gradio_app(app, gr_interface, path="/")
 
 
 
 
 
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")