Spaces:
Running on Zero
Running on Zero
forge: mount Gradio at /ui so it does not shadow /health and /v1
Browse files
app.py
CHANGED
|
@@ -150,7 +150,8 @@ demo = gr.Interface(fn=chat,
|
|
| 150 |
title="Forge model server",
|
| 151 |
description="OpenAI-compatible endpoint at /v1/chat/completions")
|
| 152 |
|
| 153 |
-
|
|
|
|
| 154 |
|
| 155 |
# NOTE: do NOT run uvicorn here. The HF Gradio runtime already binds PORT (7860);
|
| 156 |
# launching our own server there fails with "address already in use". The mounted
|
|
|
|
| 150 |
title="Forge model server",
|
| 151 |
description="OpenAI-compatible endpoint at /v1/chat/completions")
|
| 152 |
|
| 153 |
+
# Gradio must NOT mount at "/": its catch-all shadows /health and /v1/*.
|
| 154 |
+
app = gr.mount_gradio_app(app, demo, path="/ui")
|
| 155 |
|
| 156 |
# NOTE: do NOT run uvicorn here. The HF Gradio runtime already binds PORT (7860);
|
| 157 |
# launching our own server there fails with "address already in use". The mounted
|