oversai-models / src /config.py
ogirald0's picture
Initial commit for Hugging Face deployment
18869bb
raw
history blame contribute delete
622 Bytes
from pydantic_settings import BaseSettings
from pydantic import Field
class Settings(BaseSettings):
"""Application settings."""
app_name: str = "ML Models API"
debug: bool = Field(default=False, env="DEBUG")
host: str = Field(default="127.0.0.1", env="HOST")
port: int = Field(default=8000, env="PORT")
# Add model-specific configurations here
MODEL_CACHE_DIR: str = "model_cache"
MAX_BATCH_SIZE: int = 32
class Config:
env_file = ".env"
env_file_encoding = "utf-8"
def get_settings() -> Settings:
"""Get application settings."""
return Settings()