File size: 840 Bytes
de597ec |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
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."""
@staticmethod
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 |