cazyundee commited on
Commit
153a821
·
verified ·
1 Parent(s): eb1105f

Expose mounted FastAPI app for Spaces

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -232,8 +232,9 @@ with gr.Blocks(title="Respite API") as demo:
232
 
233
  # Mount the Gradio UI under the FastAPI application so API routes remain
234
  # available at /api/* instead of being handled by Gradio's catch-all route.
 
235
  app = gr.mount_gradio_app(api, demo, path="/")
236
 
237
  # Spaces starts the app itself; this block is only for direct local execution.
238
  if __name__ == "__main__":
239
- demo.queue(max_size=4, default_concurrency_limit=1).launch()
 
232
 
233
  # Mount the Gradio UI under the FastAPI application so API routes remain
234
  # available at /api/* instead of being handled by Gradio's catch-all route.
235
+ demo.queue(max_size=4, default_concurrency_limit=1)
236
  app = gr.mount_gradio_app(api, demo, path="/")
237
 
238
  # Spaces starts the app itself; this block is only for direct local execution.
239
  if __name__ == "__main__":
240
+ demo.launch()