petter2025 commited on
Commit
1da74ed
·
verified ·
1 Parent(s): 40981c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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
- app = gr.mount_gradio_app(demo, fastapi_app, path="/api")
 
222
 
223
- # Note: No manual server start. Hugging Face will serve this `app` (which is a Gradio app)
224
- # and the FastAPI endpoints will be available under /api.
 
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.