space: move /static mount ahead of gradio catch-all (styling regression fix)
Browse files- space/app.py +1 -0
space/app.py
CHANGED
|
@@ -323,6 +323,7 @@ if __name__ == "__main__":
|
|
| 323 |
# include_router appends; move our routes ahead of gradio's catch-alls.
|
| 324 |
our = [r for r in fastapi_app.router.routes if getattr(r, "name", "") in {
|
| 325 |
"status", "whisper", "probe", "landing", "play", "pty_bridge",
|
|
|
|
| 326 |
}]
|
| 327 |
for r in our:
|
| 328 |
fastapi_app.router.routes.remove(r)
|
|
|
|
| 323 |
# include_router appends; move our routes ahead of gradio's catch-alls.
|
| 324 |
our = [r for r in fastapi_app.router.routes if getattr(r, "name", "") in {
|
| 325 |
"status", "whisper", "probe", "landing", "play", "pty_bridge",
|
| 326 |
+
"static", # the stylesheet/font mount MUST beat gradio's catch-all
|
| 327 |
}]
|
| 328 |
for r in our:
|
| 329 |
fastapi_app.router.routes.remove(r)
|