Spaces:
Sleeping
Sleeping
Download app/config.py from AnishDev/coderound-task-backend: direct link, hf CLI and curl.
- Browser
- Download file 904 Bytes
-
https://huggingface.co/spaces/AnishDev/coderound-task-backend/resolve/main/app/config.py
- Command line
-
hf download hf://spaces/AnishDev/coderound-task-backend/app/config.py
-
curl -L -o config.py https://huggingface.co/spaces/AnishDev/coderound-task-backend/resolve/main/app/config.py
904 Bytes
| from pydantic_settings import BaseSettings | |
| from functools import lru_cache | |
| class Settings(BaseSettings): | |
| # Ollama cloud | |
| ollama_host: str = "https://ollama.com" | |
| ollama_api_key: str = "" | |
| ollama_model: str = "gpt-oss:120b-cloud" | |
| # Redis | |
| redis_url: str = "redis://localhost:6379" | |
| # CORS (comma-separated) | |
| cors_origins: str = "http://localhost:3000" | |
| # App | |
| debug: bool = False | |
| log_level: str = "INFO" | |
| # Model | |
| embedding_model: str = "all-MiniLM-L6-v2" | |
| # Matching | |
| bm25_prefilter_threshold: int = 200 | |
| bm25_top_k: int = 500 | |
| def cors_origins_list(self) -> list[str]: | |
| return [o.strip() for o in self.cors_origins.split(",") if o.strip()] | |
| model_config = {"env_file": ".env", "case_sensitive": False, "extra": "ignore"} | |
| def get_settings() -> Settings: | |
| return Settings() | |
| settings = get_settings() | |