MogensR commited on
Commit
a011b1e
·
1 Parent(s): 8ac49bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -787,7 +787,12 @@ def process_image(input_image):
787
  print(" ✓ Professional UI with branding")
788
  print("=" * 80)
789
 
790
- # Launch the application
791
  if __name__ == "__main__":
792
  print("Launching Gradio interface...")
793
- demo.launch()
 
 
 
 
 
 
787
  print(" ✓ Professional UI with branding")
788
  print("=" * 80)
789
 
790
+ # Launch the application - HuggingFace Spaces compatible
791
  if __name__ == "__main__":
792
  print("Launching Gradio interface...")
793
+ import sys
794
+ if "google.colab" in sys.modules:
795
+ demo.launch(debug=True)
796
+ else:
797
+ # For HuggingFace Spaces
798
+ demo.launch(server_name="0.0.0.0", server_port=7860)