Download src/sd_robustness/paths.py from Ulairi/ADSD: direct link, hf CLI and curl.
- Browser
- Download file 406 Bytes
-
https://huggingface.co/spaces/Ulairi/ADSD/resolve/main/src/sd_robustness/paths.py
- Command line
-
hf download hf://spaces/Ulairi/ADSD/src/sd_robustness/paths.py
-
curl -L -o paths.py https://huggingface.co/spaces/Ulairi/ADSD/resolve/main/src/sd_robustness/paths.py
406 Bytes
| """Resolve configured artifact and cache directories.""" | |
| from __future__ import annotations | |
| import os | |
| from pathlib import Path | |
| def default_cache_root() -> Path: | |
| value = os.environ.get('SHARED_CACHE_ROOT') or os.environ.get('ADSD_CACHE_ROOT') | |
| if not value: | |
| raise ValueError('Set SHARED_CACHE_ROOT or ADSD_CACHE_ROOT; run.py supplies it automatically') | |
| return Path(value).expanduser() | |