Download code/install_inference.py from m-a-p/WildSongBench: direct link, hf CLI and curl.
- Browser
- Download file 904 Bytes
-
https://huggingface.co/datasets/m-a-p/WildSongBench/resolve/4b0e5226cdb4ba08e1774d4cfd8d5fc87bb90c37/code/install_inference.py
- Command line
-
hf download hf://datasets/m-a-p/WildSongBench@4b0e5226cdb4ba08e1774d4cfd8d5fc87bb90c37/code/install_inference.py
-
curl -L -o install_inference.py https://huggingface.co/datasets/m-a-p/WildSongBench/resolve/4b0e5226cdb4ba08e1774d4cfd8d5fc87bb90c37/code/install_inference.py
904 Bytes
| #!/usr/bin/env python3 | |
| """Install the exact inference wheel used by this reproduction recipe.""" | |
| import hashlib | |
| import argparse | |
| import subprocess | |
| import sys | |
| from huggingface_hub import hf_hub_download | |
| parser = argparse.ArgumentParser(description=__doc__) | |
| parser.add_argument("--fast", action="store_true", help="Also install the released optional vLLM dependencies") | |
| args = parser.parse_args() | |
| wheel = hf_hub_download( | |
| "m-a-p/YuE2-3B", "yue2_infer-0.1.3-py3-none-any.whl", | |
| revision="1a96eca688d6ae5d7f0feb88573fec89920fcd19", | |
| ) | |
| with open(wheel, "rb") as stream: | |
| assert hashlib.sha256(stream.read()).hexdigest() == "156d6b8b7e46c3bd23cf22a50d3c20c403e5dc7f4a315582a224a840b01f4f07" | |
| subprocess.check_call([sys.executable, "-m", "pip", "install", "--force-reinstall", "--no-deps", wheel]) | |
| subprocess.check_call([sys.executable, "-m", "pip", "install", wheel + ("[fast]" if args.fast else "")]) | |