Spaces:
Runtime error
Runtime error
AbelGAlem
feat(server): implement FastAPI application with model loading(HF HUB), CORS support, prediction endpoint and Docker
a65c9ed Download app/config.py from HelloWorld47474747/ScanServer: direct link, hf CLI and curl.
- Browser
- Download file 386 Bytes
-
https://huggingface.co/spaces/HelloWorld47474747/ScanServer/resolve/main/app/config.py
- Command line
-
hf download hf://spaces/HelloWorld47474747/ScanServer/app/config.py
-
curl -L -o config.py https://huggingface.co/spaces/HelloWorld47474747/ScanServer/resolve/main/app/config.py
386 Bytes
| import os | |
| from dotenv import load_dotenv | |
| # Load environment variables from .env file | |
| load_dotenv() | |
| # Redis config | |
| REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379") | |
| # Rate limiting: requests per time window per IP | |
| RATE_TIMES = int(os.getenv("RATE_TIMES", "60")) | |
| RATE_SECONDS = int(os.getenv("RATE_SECONDS", "60")) | |
| TRUSTED_HOSTS = os.getenv("TRUSTED_HOSTS", "*").split(",") |