thecoderhere commited on
Commit
694a60d
·
verified ·
1 Parent(s): add75cd

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +9 -5
run.py CHANGED
@@ -1,5 +1,9 @@
1
- from app import app
2
-
3
- if __name__ == '__main__':
4
- print("Starting Flask application...")
5
- app.run(debug=True, port=5000)
 
 
 
 
 
1
+ from app import create_app
2
+ import os
3
+
4
+ app = create_app()
5
+
6
+ if __name__ == '__main__':
7
+ # Hugging Face uses port 7860
8
+ port = int(os.environ.get('PORT', 7860))
9
+ app.run(host='0.0.0.0', port=port, debug=False)