File size: 527 Bytes
a5c5ad4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""
Application entry point
"""
import os
from app import create_app

app = create_app()

if __name__ == "__main__":
    port = int(os.getenv("PORT", 7860))
    debug = os.getenv("FLASK_ENV") == "development"
    
    print(f"πŸš€ Starting Flask OpenAI Chat on port {port}")
    print(f"πŸ”§ Debug mode: {debug}")
    print(f"πŸ“ Health check: http://localhost:{port}/health")
    print(f"πŸ’¬ Chat endpoint: http://localhost:{port}/chat")
    
    app.run(
        host="0.0.0.0",
        port=port,
        debug=debug
    )