Spaces:
Running
Running
Download app.py from pgits/voiceCal-ai: direct link, hf CLI and curl.
- Browser
- Download file 582 Bytes
-
https://huggingface.co/spaces/pgits/voiceCal-ai/resolve/main/app.py
- Command line
-
hf download hf://spaces/pgits/voiceCal-ai/app.py
-
curl -L -o app.py https://huggingface.co/spaces/pgits/voiceCal-ai/resolve/main/app.py
582 Bytes
| """ | |
| 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 | |
| ) | |