Download TextGen/ConfigEnv.py from HemanthSai7/Deploy-FastAPI-Applications: direct link, hf CLI and curl.
- Browser
- Download file 372 Bytes
-
https://huggingface.co/spaces/HemanthSai7/Deploy-FastAPI-Applications/resolve/main/TextGen/ConfigEnv.py
- Command line
-
hf download hf://spaces/HemanthSai7/Deploy-FastAPI-Applications/TextGen/ConfigEnv.py
-
curl -L -o ConfigEnv.py https://huggingface.co/spaces/HemanthSai7/Deploy-FastAPI-Applications/resolve/main/TextGen/ConfigEnv.py
372 Bytes
| """Config class for handling env variables. | |
| """ | |
| from functools import lru_cache | |
| from pydantic import BaseSettings | |
| class Settings(BaseSettings): | |
| APP_ID: str | |
| USER_ID: str | |
| MODEL_ID: str | |
| CLARIFAI_PAT: str | |
| MODEL_VERSION_ID: str | |
| class Config: | |
| env_file = '.env' | |
| def get_settings(): | |
| return Settings() | |
| config = get_settings() |