Spaces:
Running on Zero
Running on Zero
Download space/vendor/utils/paths.py from AlayaLab/FloodDiffusion2-Live: direct link, hf CLI and curl.
- Browser
- Download file 588 Bytes
-
https://huggingface.co/spaces/AlayaLab/FloodDiffusion2-Live/resolve/main/space/vendor/utils/paths.py
- Command line
-
hf download hf://spaces/AlayaLab/FloodDiffusion2-Live/space/vendor/utils/paths.py
-
curl -L -o paths.py https://huggingface.co/spaces/AlayaLab/FloodDiffusion2-Live/resolve/main/space/vendor/utils/paths.py
588 Bytes
| """Centralized path configuration loaded from configs/paths.yaml. | |
| Usage: | |
| from utils.paths import PATHS | |
| raw_data = PATHS["raw_data"] | |
| deps = PATHS["deps"] | |
| outputs = PATHS["outputs"] | |
| """ | |
| from pathlib import Path | |
| import yaml | |
| _PROJECT_ROOT = Path(__file__).resolve().parents[1] | |
| _paths_yaml = _PROJECT_ROOT / "configs" / "paths.yaml" | |
| if not _paths_yaml.exists(): | |
| _paths_yaml = _PROJECT_ROOT / "configs" / "paths_default.yaml" | |
| with open(_paths_yaml) as f: | |
| _cfg = yaml.safe_load(f) | |
| PATHS = {k: Path(v) for k, v in _cfg.get("dirs", {}).items()} | |