cazyundee commited on
Commit
12e32d6
·
verified ·
1 Parent(s): d1ff2f5

Switch Space SDK to python for direct FastAPI serving

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -235,6 +235,5 @@ with gr.Blocks(title="Respite API") as demo:
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()
 
235
  demo.queue(max_size=4, default_concurrency_limit=1)
236
  app = gr.mount_gradio_app(api, demo, path="/")
237
 
238
+ # Spaces (sdk: python) serves the ASGI `app` variable directly.
239
+ # For local development: uvicorn app:app --host 0.0.0.0 --port 7860