lov2 / app /core /config.py
work-sejal
Use remote HF dataset repo orderlymirror/lo and align HF Space env paths
c327792
Raw
History Blame Contribute Delete
1.11 kB
"""Centralized configuration system using pydantic-settings.
All environment-driven settings are defined here. No module outside this file
should read os.environ directly.
"""
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
"""Application settings loaded from environment variables and .env file."""
ai_service_name: str = "LearningOutcomeOS-AI-V2"
ai_service_version: str = "2.0.0"
# Paths — overridden by .env for local dev vs Hugging Face deployment
dataset_dir: str = "../learning_outcome_os_dataset_v2"
dataset_repo_id: str | None = "orderlymirror/lo"
model_artifact_dir: str = "./artifacts/models"
metrics_dir: str = "./artifacts/metrics"
reports_dir: str = "./artifacts/reports"
feedback_dir: str = "./artifacts/feedback"
log_level: str = "INFO"
seed: int = 20260520
low_confidence_threshold: float = 0.55
enable_explainability: bool = True
log_salt: str = "hf-space-default-salt"
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
settings = Settings()