Babajaan commited on
Commit
22e1504
·
verified ·
1 Parent(s): 79f5f9c

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -891,9 +891,13 @@ def main():
891
  app = create_gradio_interface()
892
 
893
  # Launch the app
 
 
 
 
894
  app.launch(
895
  server_name="0.0.0.0",
896
- server_port=7861,
897
  share=False,
898
  show_error=True,
899
  quiet=False
 
891
  app = create_gradio_interface()
892
 
893
  # Launch the app
894
+ # For Hugging Face Spaces, use environment variable for port
895
+ import os
896
+ port = int(os.environ.get("GRADIO_SERVER_PORT", 7860))
897
+
898
  app.launch(
899
  server_name="0.0.0.0",
900
+ server_port=port,
901
  share=False,
902
  show_error=True,
903
  quiet=False