Spaces:
Runtime error
Runtime error
File size: 561 Bytes
68cd8f8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
from pathlib import Path
from pydantic_settings import BaseSettings
FILE = Path(__file__)
ROOT = FILE.parent.parent
class Settings(BaseSettings):
# API SETTINGS
HOST: str
PORT: int
CORS_ORIGINS: list
CORS_HEADERS: list
# MODEL SETTINGS
MODEL_NAME: str = "ViT-B/32"
DEVICE: str = "cpu"
# FAISS DATABASE SETTINGS
INDEX_FILE_PATH: str
INDEX_SUBFRAMES_FILE_PATH: str
KEYFRAMES_GROUPS_JSON_PATH: str
SUBFRAMES_GROUPS_JSON_PATH: str
class Config:
env_file = ROOT / ".env"
settings = Settings()
|