Spaces:
Sleeping
Sleeping
Download src/config.py from Oriskany/clip_api: direct link, hf CLI and curl.
- Browser
- Download file 486 Bytes
-
https://huggingface.co/spaces/Oriskany/clip_api/resolve/main/src/config.py
- Command line
-
hf download hf://spaces/Oriskany/clip_api/src/config.py
-
curl -L -o config.py https://huggingface.co/spaces/Oriskany/clip_api/resolve/main/src/config.py
486 Bytes
| from pathlib import Path | |
| from pydantic_settings import BaseSettings | |
| ROOT = Path(__file__).parent.parent | |
| class Settings(BaseSettings): | |
| # API SETTINGS | |
| HOST: str | |
| PORT: int | |
| # MODEL SETTINGS | |
| MODEL_NAME: str = "ViT-B-16" | |
| MODEL_CHECKPOINT: str = "laion2B-s34B-b88K" | |
| DEVICE: str = "cuda" | |
| # FAISS DATABASE SETTINGS | |
| FAISS_INDEX_FILE_PATH: str | |
| KEYFRAMES_GROUPS_JSON_PATH: str | |
| class Config: | |
| env_file = ROOT / ".env" | |
| settings = Settings() | |