Spaces:
Paused
Paused
Download infer/modules/vc/utils.py from JacobLinCool/ZeroRVC: direct link, hf CLI and curl.
- Browser
- Download file 423 Bytes
-
https://huggingface.co/spaces/JacobLinCool/ZeroRVC/resolve/refs%2Fpr%2F1/infer/modules/vc/utils.py
- Command line
-
hf download hf://spaces/JacobLinCool/ZeroRVC@refs/pr/1/infer/modules/vc/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/JacobLinCool/ZeroRVC/resolve/refs%2Fpr%2F1/infer/modules/vc/utils.py
423 Bytes
| import os | |
| def get_index_path_from_model(sid): | |
| return next( | |
| ( | |
| f | |
| for f in [ | |
| os.path.join(root, name) | |
| for root, _, files in os.walk(os.getenv("index_root"), topdown=False) | |
| for name in files | |
| if name.endswith(".index") and "trained" not in name | |
| ] | |
| if sid.split(".")[0] in f | |
| ), | |
| "", | |
| ) | |