Download scripts/_bootstrap.py from OneScience-Group/NABP-LSTM-Att: direct link, hf CLI and curl.
- Browser
- Download file 559 Bytes
-
https://huggingface.co/OneScience-Group/NABP-LSTM-Att/resolve/main/scripts/_bootstrap.py
- Command line
-
hf download hf://OneScience-Group/NABP-LSTM-Att/scripts/_bootstrap.py
-
curl -L -o _bootstrap.py https://huggingface.co/OneScience-Group/NABP-LSTM-Att/resolve/main/scripts/_bootstrap.py
559 Bytes
| """Shared absolute paths for scripts executed directly from this directory.""" | |
| import os | |
| import sys | |
| from pathlib import Path | |
| PROJECT_ROOT = Path(__file__).resolve().parents[1] | |
| if str(PROJECT_ROOT) not in sys.path: | |
| sys.path.insert(0, str(PROJECT_ROOT)) | |
| CONF_DIR = PROJECT_ROOT / "conf" | |
| DATA_DIR = CONF_DIR / "data" | |
| VOCAB_DIR = CONF_DIR / "vocab" | |
| WEIGHT_DIR = PROJECT_ROOT / "weight" | |
| OUTPUT_DIR = PROJECT_ROOT / "output" | |
| def use_project_root(): | |
| """Run an upstream script's relative paths against the repository root.""" | |
| os.chdir(PROJECT_ROOT) | |