Update app.py
Browse files
app.py
CHANGED
|
@@ -218,7 +218,8 @@ with gr.Blocks(title="ARF v4 Demo") as demo:
|
|
| 218 |
history_btn.click(fn=lambda: decision_history[-10:], outputs=decision_output)
|
| 219 |
|
| 220 |
# ========================= Mount FastAPI under /api =========================
|
| 221 |
-
|
|
|
|
| 222 |
|
| 223 |
-
# Note: No manual server start. Hugging Face will serve this `app` (which is a
|
| 224 |
-
# and the
|
|
|
|
| 218 |
history_btn.click(fn=lambda: decision_history[-10:], outputs=decision_output)
|
| 219 |
|
| 220 |
# ========================= Mount FastAPI under /api =========================
|
| 221 |
+
# Correct order: first the FastAPI app, then the Gradio blocks.
|
| 222 |
+
app = gr.mount_gradio_app(fastapi_app, demo, path="/api")
|
| 223 |
|
| 224 |
+
# Note: No manual server start. Hugging Face will serve this `app` (which is a FastAPI app with Gradio mounted)
|
| 225 |
+
# and the Gradio interface will be at the root, API endpoints under /api.
|