ngwakomadikwe commited on
Commit
a5c5ad4
Β·
verified Β·
1 Parent(s): b6a28e0

Create run.py

Browse files
Files changed (1) hide show
  1. run.py +22 -0
run.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Application entry point
3
+ """
4
+ import os
5
+ from app import create_app
6
+
7
+ app = create_app()
8
+
9
+ if __name__ == "__main__":
10
+ port = int(os.getenv("PORT", 7860))
11
+ debug = os.getenv("FLASK_ENV") == "development"
12
+
13
+ print(f"πŸš€ Starting Flask OpenAI Chat on port {port}")
14
+ print(f"πŸ”§ Debug mode: {debug}")
15
+ print(f"πŸ“ Health check: http://localhost:{port}/health")
16
+ print(f"πŸ’¬ Chat endpoint: http://localhost:{port}/chat")
17
+
18
+ app.run(
19
+ host="0.0.0.0",
20
+ port=port,
21
+ debug=debug
22
+ )