Itachi-1824 commited on
Commit ·
a0d8e70
1
Parent(s): 696bc46
fix: mount gradio at / (maverick pattern)
Browse files- server/app.py +3 -10
server/app.py
CHANGED
|
@@ -142,16 +142,9 @@ try:
|
|
| 142 |
from server.gradio_landing import create_landing_app
|
| 143 |
|
| 144 |
_landing = create_landing_app()
|
| 145 |
-
# Mount at
|
| 146 |
-
app = gr.mount_gradio_app(app, _landing, path="/
|
| 147 |
-
|
| 148 |
-
# Redirect / to /web
|
| 149 |
-
from fastapi.responses import RedirectResponse
|
| 150 |
-
@app.get("/", include_in_schema=False)
|
| 151 |
-
def _redirect_root():
|
| 152 |
-
return RedirectResponse(url="/web")
|
| 153 |
-
|
| 154 |
-
print(f"[gradio_landing] mounted at /web — gradio {gr.__version__}", flush=True)
|
| 155 |
except Exception as e:
|
| 156 |
import sys
|
| 157 |
import traceback
|
|
|
|
| 142 |
from server.gradio_landing import create_landing_app
|
| 143 |
|
| 144 |
_landing = create_landing_app()
|
| 145 |
+
# Mount at / — exactly like Maverick98's working pattern
|
| 146 |
+
app = gr.mount_gradio_app(app, _landing, path="/")
|
| 147 |
+
print(f"[gradio_landing] mounted at / — gradio {gr.__version__}", flush=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
except Exception as e:
|
| 149 |
import sys
|
| 150 |
import traceback
|