Mehdi commited on
Commit ·
008db30
1
Parent(s): fffdc96
fix: mount /blog before Gradio so static files aren't swallowed by catch-all route
Browse files
app.py
CHANGED
|
@@ -1078,8 +1078,8 @@ print("✅ Gradio demo defined successfully")
|
|
| 1078 |
|
| 1079 |
print("✅ Launching demo...")
|
| 1080 |
_fastapi = FastAPI()
|
|
|
|
| 1081 |
app = gr.mount_gradio_app(_fastapi, demo, path="/")
|
| 1082 |
-
app.mount("/blog", StaticFiles(directory="blog", html=True), name="blog")
|
| 1083 |
|
| 1084 |
if __name__ == "__main__":
|
| 1085 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|
|
|
|
| 1078 |
|
| 1079 |
print("✅ Launching demo...")
|
| 1080 |
_fastapi = FastAPI()
|
| 1081 |
+
_fastapi.mount("/blog", StaticFiles(directory="blog", html=True), name="blog")
|
| 1082 |
app = gr.mount_gradio_app(_fastapi, demo, path="/")
|
|
|
|
| 1083 |
|
| 1084 |
if __name__ == "__main__":
|
| 1085 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|