Spaces:
Sleeping
Sleeping
| """ | |
| HuggingFace Spaces entry point for ChatCal.ai | |
| v0.3.1 - Corrected for HF deployment | |
| """ | |
| import os | |
| import uvicorn | |
| # Set HF-specific environment variables | |
| os.environ.setdefault("SESSION_BACKEND", "jwt") | |
| os.environ.setdefault("APP_ENV", "production") | |
| os.environ.setdefault("PORT", "7860") | |
| if __name__ == "__main__": | |
| # Change to the chatcal-ai directory where the app module is | |
| os.chdir('/app/chatcal-ai') | |
| # Run uvicorn with the correct module path | |
| uvicorn.run( | |
| "app.api.main:app", | |
| host="0.0.0.0", | |
| port=7860, | |
| reload=False | |
| ) | |