Download tracker/utils/load_subset.py from Lozwang/ROSE: direct link, hf CLI and curl.
- Browser
- Download file 259 Bytes
-
https://huggingface.co/spaces/Lozwang/ROSE/resolve/main/tracker/utils/load_subset.py
- Command line
-
hf download hf://spaces/Lozwang/ROSE/tracker/utils/load_subset.py
-
curl -L -o load_subset.py https://huggingface.co/spaces/Lozwang/ROSE/resolve/main/tracker/utils/load_subset.py
259 Bytes
| import json | |
| def load_subset(path): | |
| with open(path, mode='r') as f: | |
| subset = set(f.read().splitlines()) | |
| return subset | |
| def load_empty_masks(path): | |
| with open(path, mode='r') as f: | |
| empty_masks = json.load(f) | |
| return empty_masks | |