Spaces:
Runtime error
Runtime error
Download config/settings.py from utkarsh134/FastAPI-Experience-Extractor: direct link, hf CLI and curl.
- Browser
- Download file 860 Bytes
-
https://huggingface.co/spaces/utkarsh134/FastAPI-Experience-Extractor/resolve/main/config/settings.py
- Command line
-
hf download hf://spaces/utkarsh134/FastAPI-Experience-Extractor/config/settings.py
-
curl -L -o settings.py https://huggingface.co/spaces/utkarsh134/FastAPI-Experience-Extractor/resolve/main/config/settings.py
860 Bytes
| import os | |
| from dotenv import load_dotenv | |
| DEFAULT_CHUNK_SIZE = 1000 | |
| DEFAULT_CHUNK_OVERLAP = 200 | |
| DEFAULT_LLM_MODEL = "gemini-2.0-flash" | |
| DEFAULT_EMBEDDING_MODEL = "models/embedding-001" | |
| DEFAULT_TEMPERATURE = 0 | |
| def init_settings(): | |
| load_dotenv() | |
| if not os.getenv("GOOGLE_API_KEY"): | |
| raise ValueError("GOOGLE_API_KEY environment variable is not set") | |
| def get_settings(): | |
| return { | |
| "chunk_size": int(os.getenv("CHUNK_SIZE", DEFAULT_CHUNK_SIZE)), | |
| "chunk_overlap": int(os.getenv("CHUNK_OVERLAP", DEFAULT_CHUNK_OVERLAP)), | |
| "llm_model": os.getenv("LLM_MODEL", DEFAULT_LLM_MODEL), | |
| "embedding_model": os.getenv("EMBEDDING_MODEL", DEFAULT_EMBEDDING_MODEL), | |
| "temperature": float(os.getenv("TEMPERATURE", DEFAULT_TEMPERATURE)), | |
| "google_api_key": os.getenv("GOOGLE_API_KEY") | |
| } |