avoigt1121 Claude Opus 4.8 commited on
Commit
d38496a
·
1 Parent(s): 3f72683

Fix HF Space stuck on "Starting": disable Gradio experimental SSR

Browse files

gradio 5.49 auto-enables SSR on HF Spaces (Node present); HF's readiness check
goes through the experimental SSR layer and never passes, so the Space hangs on
"Starting" even though the app binds 7860 and serves. Default ssr_mode off in
launch() (overridable via kwargs / GRADIO_SSR_MODE).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Files changed (1) hide show
  1. gradio_ui.py +4 -0
gradio_ui.py CHANGED
@@ -1081,4 +1081,8 @@ class GradioAgentUI(_UIFormattingMixin):
1081
  kwargs.setdefault('server_name', '0.0.0.0')
1082
  kwargs.setdefault('server_port', 7860)
1083
  kwargs.setdefault('show_error', True)
 
 
 
 
1084
  app.queue(max_size=10).launch(share=share, show_api=False, favicon_path=None, **kwargs)
 
1081
  kwargs.setdefault('server_name', '0.0.0.0')
1082
  kwargs.setdefault('server_port', 7860)
1083
  kwargs.setdefault('show_error', True)
1084
+ # Disable Gradio 5.x experimental SSR: on HF Spaces it auto-enables (Node
1085
+ # present) and the readiness check hangs the Space on "Starting" forever
1086
+ # even though the app binds 7860. Overridable via kwargs / GRADIO_SSR_MODE.
1087
+ kwargs.setdefault('ssr_mode', False)
1088
  app.queue(max_size=10).launch(share=share, show_api=False, favicon_path=None, **kwargs)