Spaces:
No application file
No application file
Download TextGen/ConfigEnv.py from sccastillo/researcher: direct link, hf CLI and curl.
- Browser
- Download file 297 Bytes
-
https://huggingface.co/spaces/sccastillo/researcher/resolve/main/TextGen/ConfigEnv.py
- Command line
-
hf download hf://spaces/sccastillo/researcher/TextGen/ConfigEnv.py
-
curl -L -o ConfigEnv.py https://huggingface.co/spaces/sccastillo/researcher/resolve/main/TextGen/ConfigEnv.py
297 Bytes
| """Config class for handling env variables. | |
| """ | |
| from functools import lru_cache | |
| from pydantic import BaseSettings | |
| class Settings(BaseSettings): | |
| OPENAI_API_KEY: str | |
| class Config: | |
| env_file = '.env' | |
| def get_settings(): | |
| return Settings() | |
| config = get_settings() |