Spaces:
Sleeping
Sleeping
Download src/config.py from point9/PredictiveMaintanenceAgent: direct link, hf CLI and curl.
- Browser
- Download file 840 Bytes
-
https://huggingface.co/spaces/point9/PredictiveMaintanenceAgent/resolve/main/src/config.py
- Command line
-
hf download hf://spaces/point9/PredictiveMaintanenceAgent/src/config.py
-
curl -L -o config.py https://huggingface.co/spaces/point9/PredictiveMaintanenceAgent/resolve/main/src/config.py
840 Bytes
| import json | |
| import os | |
| from typing import Dict, Any | |
| class AppConfig: | |
| """Application and API configuration.""" | |
| # LLM Configuration | |
| MODEL_NAME: str = "gemini-2.5-flash-lite" | |
| TEMPERATURE: float = 0.0 | |
| # Server Configuration | |
| HOST: str = "0.0.0.0" | |
| PORT: int = 7860 | |
| # Application Metadata | |
| APP_TITLE: str = "Solar PV Predictive Maintenance API" | |
| APP_VERSION: str = "1.0.0" | |
| class MLConfig: | |
| """ML model configuration from ml/artifacts/ml_config.json.""" | |
| def load() -> Dict[str, Any]: | |
| """Load and return ML configuration.""" | |
| config_path = os.path.join( | |
| os.path.dirname(__file__), "..", "ml", "artifacts", "ml_config.json" | |
| ) | |
| with open(config_path) as f: | |
| return json.load(f) | |
| # For backwards compatibility | |
| Config = AppConfig |