Spaces:
Running on Zero
Running on Zero
Download env_utils.py from prabalGaur/Capstone: direct link, hf CLI and curl.
- Browser
- Download file 357 Bytes
-
https://huggingface.co/spaces/prabalGaur/Capstone/resolve/main/env_utils.py
- Command line
-
hf download hf://spaces/prabalGaur/Capstone/env_utils.py
-
curl -L -o env_utils.py https://huggingface.co/spaces/prabalGaur/Capstone/resolve/main/env_utils.py
357 Bytes
| """Load .env from repo root or week8 folder.""" | |
| from pathlib import Path | |
| from dotenv import load_dotenv | |
| WEEK8_DIR = Path(__file__).resolve().parent | |
| REPO_ROOT = WEEK8_DIR.parent | |
| def load_project_env() -> None: | |
| for path in (REPO_ROOT / ".env", WEEK8_DIR / ".env"): | |
| if path.exists(): | |
| load_dotenv(path, override=True) | |