from pathlib import Path from pydantic import BaseSettings # pydantic v1 class Settings(BaseSettings): model_path: str = str(Path(__file__).parent / "models" / "best.pt") runtime: str = "ultralytics" # ultralytics | onnx device: str = "cuda" # cuda | cpu conf_threshold: float = 0.45 class Config: env_file = ".env" env_file_encoding = "utf-8" settings = Settings()