Spaces:
Sleeping
Sleeping
Download config.py from Softprodigy/resume_search_engine: direct link, hf CLI and curl.
- Browser
- Download file 724 Bytes
-
https://huggingface.co/spaces/Softprodigy/resume_search_engine/resolve/main/config.py
- Command line
-
hf download hf://spaces/Softprodigy/resume_search_engine/config.py
-
curl -L -o config.py https://huggingface.co/spaces/Softprodigy/resume_search_engine/resolve/main/config.py
724 Bytes
| """ | |
| Configuration file for the AI Resume Search application | |
| """ | |
| import os | |
| from dotenv import load_dotenv | |
| # Load environment variables | |
| load_dotenv() | |
| # OpenAI Configuration | |
| OPENAI_API_KEY = os.getenv('OPENAI_API_KEY') | |
| # Application Configuration | |
| DEBUG = os.getenv('DEBUG', 'false').lower() == 'true' | |
| CACHE_FILE = "embeddings_cache.pkl" | |
| # Validation | |
| def validate_config(): | |
| """Validate that required configuration is present""" | |
| if not OPENAI_API_KEY: | |
| raise ValueError( | |
| "OPENAI_API_KEY not found in environment variables. " | |
| "Please set it in your .env file or environment variables. " | |
| "Get your API key from: https://platform.openai.com/api-keys" | |
| ) | |
| return True | |