ApsidalSolid4 commited on
Commit
0758af0
·
verified ·
1 Parent(s): f96f0ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -9
app.py CHANGED
@@ -356,13 +356,15 @@ demo = gr.Interface(
356
  flagging_mode=None
357
  )
358
 
359
- # Launch with specific configuration
360
  if __name__ == "__main__":
361
- demo.launch(
362
- server_name="0.0.0.0", # Listen on all network interfaces
363
- server_port=7860, # Use standard Gradio port
364
- share=False, # Disable sharing
365
- debug=True, # Enable debug mode for better error messages
366
- show_error=True, # Show detailed error messages
367
- ssr=False # Disable server-side rendering
368
- )
 
 
 
356
  flagging_mode=None
357
  )
358
 
359
+ # Launch with minimal configuration
360
  if __name__ == "__main__":
361
+ if os.getenv('SPACE_ID'):
362
+ # Running on Hugging Face Spaces
363
+ demo.launch()
364
+ else:
365
+ # Running locally
366
+ demo.launch(
367
+ server_name="0.0.0.0",
368
+ server_port=7860,
369
+ share=False
370
+ )