Spaces:
Runtime error
Runtime error
Download app.py from ch404/cardserver: direct link, hf CLI and curl.
- Browser
- Download file 567 Bytes
-
https://huggingface.co/spaces/ch404/cardserver/resolve/main/app.py
- Command line
-
hf download hf://spaces/ch404/cardserver/app.py
-
curl -L -o app.py https://huggingface.co/spaces/ch404/cardserver/resolve/main/app.py
567 Bytes
| #!/usr/bin/env python3 | |
| """ | |
| Entry point for Hugging Face Spaces deployment. | |
| This file is required by Hugging Face Spaces to know how to start the application. | |
| """ | |
| import uvicorn | |
| from app.main import app | |
| if __name__ == "__main__": | |
| # This will be called when running locally with `python app.py` | |
| uvicorn.run( | |
| "app.main:app", | |
| host="0.0.0.0", | |
| port=7860, # Hugging Face Spaces default port | |
| reload=False | |
| ) | |
| else: | |
| # This is used when imported by Hugging Face Spaces | |
| # HF Spaces will import `app` from this module | |
| pass | |