30 lines
488 B
Python
30 lines
488 B
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
APP_NAME: str = "AI Moderation"
|
|
|
|
APP_VERSION: str = "1.0.0"
|
|
|
|
HOST: str = "0.0.0.0"
|
|
|
|
PORT: int = 8000
|
|
|
|
DEBUG: bool = True
|
|
|
|
# ===== AI =====
|
|
|
|
TEXT_MODEL: str = "textdetox/bert-multilingual-toxicity-classifier"
|
|
|
|
|
|
MODEL_CACHE_DIR: str = "./models"
|
|
|
|
DEVICE: str = "auto"
|
|
|
|
model_config = SettingsConfigDict(
|
|
env_file=".env",
|
|
extra="ignore"
|
|
)
|
|
|
|
settings = Settings()
|