Spaces:
Sleeping
Sleeping
Download scripts/_bootstrap.py from s1ngledoge/Image-Retrieval-System: direct link, hf CLI and curl.
- Browser
- Download file 282 Bytes
-
https://huggingface.co/spaces/s1ngledoge/Image-Retrieval-System/resolve/main/scripts/_bootstrap.py
- Command line
-
hf download hf://spaces/s1ngledoge/Image-Retrieval-System/scripts/_bootstrap.py
-
curl -L -o _bootstrap.py https://huggingface.co/spaces/s1ngledoge/Image-Retrieval-System/resolve/main/scripts/_bootstrap.py
282 Bytes
| from __future__ import annotations | |
| import sys | |
| from pathlib import Path | |
| PROJECT_ROOT = Path(__file__).resolve().parents[1] | |
| def add_project_root_to_path() -> Path: | |
| root = str(PROJECT_ROOT) | |
| if root not in sys.path: | |
| sys.path.insert(0, root) | |
| return PROJECT_ROOT | |