Meme-Recommender / config /settings.py
Diwakar Basnet
Added bucket mount path
751b81a
Raw
History Blame Contribute Delete
870 Bytes
import torch
from pathlib import Path
from typing import Dict, Any, Optional
from pydantic_settings import BaseSettings, SettingsConfigDict
from pydantic import Field
class Settings(BaseSettings):
# Pinecone Settings (Loaded from .env)
pinecone_api_key: str
pinecone_index_name: str
project_root: Path = Field(default=Path(__file__).parent.parent)
# Hugging Face Settings
model_repo_id: str = "Unspoiled-Egg/ijepa-vit-huge-target-encoder"
hf_token: Optional[str] = None
# Model & Inference Settings
mount_path: str = "/data"
batch_size: int = 4
device: str = "cuda" if torch.cuda.is_available() else "cpu"
embedding_dim: int = 5120
model_config = SettingsConfigDict(
env_file=".env",
env_file_encoding="utf-8",
extra="ignore"
)
# Create the singleton instance
settings = Settings()