Spaces:
Sleeping
Sleeping
Download settings.py from DhyandevP/entri-proctor-api: direct link, hf CLI and curl.
- Browser
- Download file 814 Bytes
-
https://huggingface.co/spaces/DhyandevP/entri-proctor-api/resolve/main/settings.py
- Command line
-
hf download hf://spaces/DhyandevP/entri-proctor-api/settings.py
-
curl -L -o settings.py https://huggingface.co/spaces/DhyandevP/entri-proctor-api/resolve/main/settings.py
814 Bytes
| from functools import lru_cache | |
| from typing import List | |
| from pydantic_settings import BaseSettings, SettingsConfigDict | |
| class Settings(BaseSettings): | |
| # API security (loaded from environment variable API_KEY or .env) | |
| api_key: str = "" | |
| api_base_url: str = "https://dhyandevp-entri-proctor-api.hf.space" | |
| # Server configs | |
| api_host: str = "0.0.0.0" | |
| api_port: int = 8000 | |
| allowed_origins: List[str] = ["*"] | |
| max_upload_bytes: int = 5 * 1024 * 1024 # 5MB upload limit | |
| # Inference workers | |
| ai_thread_workers: int = 2 | |
| api_workers: int = 1 | |
| api_reload: bool = False | |
| model_config = SettingsConfigDict( | |
| env_file=(".env", "../.env"), | |
| env_file_encoding="utf-8", | |
| extra="ignore" | |
| ) | |
| def get_settings() -> Settings: | |
| return Settings() | |