Rizwan9 commited on
Commit
7edb2ec
·
verified ·
1 Parent(s): 5b5608f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -82,7 +82,7 @@ def predict():
82
 
83
  # Local dev only; Spaces imports app:app with gunicorn
84
  if __name__ == "__main__":
85
- # Respect PORT env; default to 7860 which Spaces commonly expect
86
  port = int(os.getenv("PORT", 7860))
87
- print(f"Starting Flask dev server on http://0.0.0.0:{port}")
88
  app.run(host="0.0.0.0", port=port, debug=False)
 
82
 
83
  # Local dev only; Spaces imports app:app with gunicorn
84
  if __name__ == "__main__":
85
+ # Hugging Face expects apps to run on the $PORT (defaults to 7860)
86
  port = int(os.getenv("PORT", 7860))
87
+ print(f"Starting Flask on port {port} for Hugging Face Spaces")
88
  app.run(host="0.0.0.0", port=port, debug=False)