Download scripts/_bootstrap.py from OneScience-Group/Saluki: direct link, hf CLI and curl.
- Browser
- Download file 415 Bytes
-
https://huggingface.co/OneScience-Group/Saluki/resolve/main/scripts/_bootstrap.py
- Command line
-
hf download hf://OneScience-Group/Saluki/scripts/_bootstrap.py
-
curl -L -o _bootstrap.py https://huggingface.co/OneScience-Group/Saluki/resolve/main/scripts/_bootstrap.py
415 Bytes
| """Make command-line entry points independent of the current directory.""" | |
| from __future__ import annotations | |
| import os | |
| import sys | |
| from pathlib import Path | |
| PROJECT_ROOT = Path(__file__).resolve().parents[1] | |
| def configure_runtime() -> Path: | |
| root = str(PROJECT_ROOT) | |
| if root not in sys.path: | |
| sys.path.insert(0, root) | |
| os.environ.setdefault("TF_USE_LEGACY_KERAS", "1") | |
| return PROJECT_ROOT | |