Spaces:
Sleeping
Sleeping
Download config.py from JoyZhan/BackendPayactiv: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/spaces/JoyZhan/BackendPayactiv/resolve/main/config.py
- Command line
-
hf download hf://spaces/JoyZhan/BackendPayactiv/config.py
-
curl -L -o config.py https://huggingface.co/spaces/JoyZhan/BackendPayactiv/resolve/main/config.py
1.01 kB
| """Application configuration for the EWA Demand Forecast API.""" | |
| from pydantic import ConfigDict | |
| from pydantic_settings import BaseSettings | |
| class Settings(BaseSettings): | |
| model_config = ConfigDict(env_prefix="EWA_", env_file=".env") | |
| # API settings | |
| app_title: str = "EWA Demand Forecast API" | |
| app_description: str = ( | |
| "A FastAPI service for Exponential Weighted Average (EWA) demand forecasting" | |
| ) | |
| app_version: str = "1.0.0" | |
| debug: bool = False | |
| # Server settings | |
| host: str = "0.0.0.0" | |
| port: int = 8000 | |
| # Model defaults | |
| default_alpha: float = 0.3 # level smoothing factor (0 < alpha <= 1) | |
| default_beta: float = 0.1 # trend smoothing factor (0 < beta <= 1) | |
| default_horizon: int = 12 # default forecast horizon (periods) | |
| default_confidence_level: float = 0.95 # default confidence level for intervals | |
| min_history_length: int = 2 # minimum number of historical data points | |
| settings = Settings() | |