Spaces:
Sleeping
Sleeping
Download src/config/settings.py from Distopia22/Icd-cpt-coding-api: direct link, hf CLI and curl.
- Browser
- Download file 480 Bytes
-
https://huggingface.co/spaces/Distopia22/Icd-cpt-coding-api/resolve/d1f5b4b87fa99cd8e916e23bc343c50d1ff3de8a/src/config/settings.py
- Command line
-
hf download hf://spaces/Distopia22/Icd-cpt-coding-api@d1f5b4b87fa99cd8e916e23bc343c50d1ff3de8a/src/config/settings.py
-
curl -L -o settings.py https://huggingface.co/spaces/Distopia22/Icd-cpt-coding-api/resolve/d1f5b4b87fa99cd8e916e23bc343c50d1ff3de8a/src/config/settings.py
480 Bytes
| import os | |
| from dotenv import load_dotenv | |
| # Load environment variables from .env file | |
| load_dotenv() | |
| class Settings: | |
| GROQ_API_KEY: str = os.getenv("GROQ_API_KEY") | |
| MODEL_ID: str = os.getenv("MODEL_ID") | |
| def __init__(self): | |
| if not self.GROQ_API_KEY: | |
| raise ValueError("GROQ_API_KEY not found in environment variables") | |
| if not self.MODEL_ID: | |
| raise ValueError("MODEL_ID not found in environment variables") | |
| settings = Settings() |