Spaces:
Sleeping
Sleeping
Download main_api.py from AI-tom/notebook-lotto-runner-api: direct link, hf CLI and curl.
- Browser
- Download file 548 Bytes
-
https://huggingface.co/spaces/AI-tom/notebook-lotto-runner-api/resolve/main/main_api.py
- Command line
-
hf download hf://spaces/AI-tom/notebook-lotto-runner-api/main_api.py
-
curl -L -o main_api.py https://huggingface.co/spaces/AI-tom/notebook-lotto-runner-api/resolve/main/main_api.py
548 Bytes
| # ============================================================================ | |
| # MAIN API - FastAPI Launcher per Hugging Face Spaces | |
| # ============================================================================ | |
| import uvicorn | |
| from api_main import app | |
| if __name__ == "__main__": | |
| # Avvio del server FastAPI sulla porta 7860 (HF Spaces) | |
| uvicorn.run( | |
| app, | |
| host="0.0.0.0", | |
| port=7860, | |
| log_level="info", # mostra log dettagliati per debug | |
| reload=False # non usare reload in HF Spaces | |
| ) | |