jefffffff9 Claude Sonnet 4.6 commited on
Commit
b8e51f4
·
1 Parent(s): e09e327

Fix: disable SSR mode and use port 7860 to unblock HF Spaces startup

Browse files

SSR (Server-Side Rendering) in Gradio 5 launches a Node.js pre-render
process that hangs indefinitely in HF Spaces containers, keeping the
Space in "Starting" state forever. Disabling it makes the app ready
immediately after Gradio binds the port.

Port changed from 9001 to 7860 (standard HF Spaces Gradio port).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -622,8 +622,9 @@ if __name__ == "__main__":
622
 
623
  demo = build_ui()
624
  demo.launch(
625
- server_port=9001,
626
- inbrowser=True,
627
  share=False,
628
- show_api=False, # disables /info endpoint that crashes on Gradio 5.9.1 schema bug
 
629
  )
 
622
 
623
  demo = build_ui()
624
  demo.launch(
625
+ server_port=7860, # HF Spaces standard port
626
+ inbrowser=False,
627
  share=False,
628
+ show_api=False,
629
+ ssr_mode=False, # SSR starts a Node.js process that hangs in HF Spaces containers
630
  )