Download app/core/config.py from Gaykar/CNN: direct link, hf CLI and curl.
- Browser
- Download file 843 Bytes
-
https://huggingface.co/spaces/Gaykar/CNN/resolve/main/app/core/config.py
- Command line
-
hf download hf://spaces/Gaykar/CNN/app/core/config.py
-
curl -L -o config.py https://huggingface.co/spaces/Gaykar/CNN/resolve/main/app/core/config.py
843 Bytes
| import os | |
| from pathlib import Path | |
| from typing import Optional | |
| from pydantic_settings import BaseSettings, SettingsConfigDict | |
| BASE_DIR = Path(__file__).resolve().parent.parent.parent | |
| class Settings(BaseSettings): | |
| # --- Project Metadata --- | |
| PROJECT_NAME: str = "Neuroassist CNN Service" | |
| # S3 compatible storage. | |
| AWS_ENDPOINT_URL_S3:str | |
| AWS_ACCESS_KEY_ID:str | |
| AWS_SECRET_ACCESS_KEY:str | |
| AWS_REGION:str | |
| NEON_BUCKET:str | |
| REDIS_URL:str # For redis queueing | |
| # --- File Paths (Dynamic for Local/Cloud compatibility) --- | |
| model_config = SettingsConfigDict( | |
| env_file=str(BASE_DIR / ".env"), | |
| env_file_encoding="utf-8", | |
| extra="ignore" # Ignores extra variables in .env that aren't defined here | |
| ) | |
| # Create a singleton instance to be used across the app | |
| settings = Settings() | |