Spaces:
Running
Running
File size: 622 Bytes
18869bb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
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() |