Download scripts/_bootstrap.py from OneScience-Group/Samudra: direct link, hf CLI and curl.
- Browser
- Download file 314 Bytes
-
https://huggingface.co/OneScience-Group/Samudra/resolve/main/scripts/_bootstrap.py
- Command line
-
hf download hf://OneScience-Group/Samudra/scripts/_bootstrap.py
-
curl -L -o _bootstrap.py https://huggingface.co/OneScience-Group/Samudra/resolve/main/scripts/_bootstrap.py
314 Bytes
| """Make the project root importable when an entry point is run by path.""" | |
| from pathlib import Path | |
| import sys | |
| ROOT = Path(__file__).resolve().parents[1] | |
| SCRIPT_DIR = str(ROOT / "scripts") | |
| if SCRIPT_DIR in sys.path: | |
| sys.path.remove(SCRIPT_DIR) | |
| if str(ROOT) not in sys.path: | |
| sys.path.insert(0, str(ROOT)) | |