ElectricAlexis commited on
Commit
caf339e
·
verified ·
1 Parent(s): c7413db

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -464,13 +464,11 @@ with gr.Blocks(css=css) as demo:
464
  if __name__ == "__main__":
465
  # Check if running on Hugging Face Spaces
466
  if "SPACE_ID" in os.environ:
467
- # Running on HF Spaces - don't use share=True
468
- demo.launch(
469
- server_name="0.0.0.0",
470
- server_port=7860
471
- )
472
  else:
473
- # Running locally - can use share=True
474
  demo.launch(
475
  server_name="0.0.0.0",
476
  server_port=7860,
 
464
  if __name__ == "__main__":
465
  # Check if running on Hugging Face Spaces
466
  if "SPACE_ID" in os.environ:
467
+ # Running on HF Spaces - don't specify any server parameters
468
+ # Let HF Spaces handle the networking configuration
469
+ demo.launch()
 
 
470
  else:
471
+ # Running locally - use custom server settings and share
472
  demo.launch(
473
  server_name="0.0.0.0",
474
  server_port=7860,