Spaces:
Runtime error
Runtime error
| """ | |
| 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 | |
| ) |