fraud-detector-api / app /config.py
chotam's picture
Deploy fraud detector API
a783939
raw
history blame contribute delete
677 Bytes
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", case_sensitive=False, extra="ignore")
app_env: str = "dev"
app_version: str = "1.0.0"
db_url: str = "sqlite:///./fraud.db"
whisper_model: str = "small"
whisper_kk_model: str = "/app/models/whisper-kk/kk"
whisper_device: str = "cpu"
whisper_compute_type: str = "int8"
whisper_beam_size: int = 5
whisper_cpu_threads: int = 4
clf_path: str = "models/clf.pkl"
max_audio_mb: int = 10
risk_low_threshold: float = 0.40
risk_high_threshold: float = 0.60
settings = Settings()