Hemil Ghori commited on
Commit
c0bbf3c
·
1 Parent(s): c1f23f8

Disable Gradio SSR and bind to 0.0.0.0 for Spaces

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -137,4 +137,6 @@ def build_ui():
137
 
138
  if __name__ == "__main__":
139
  demo = build_ui()
140
- demo.launch(server_name="localhost", share=False)
 
 
 
137
 
138
  if __name__ == "__main__":
139
  demo = build_ui()
140
+ # Disable SSR to avoid asyncio selector shutdown errors in some container runtimes
141
+ # Use 0.0.0.0 so HF Spaces can bind correctly
142
+ demo.launch(server_name="0.0.0.0", share=False, ssr_mode=False)