Download load_qev.py from ken-jo/qev: direct link, hf CLI and curl.
- Browser
- Download file 394 Bytes
-
https://huggingface.co/ken-jo/qev/resolve/main/load_qev.py
- Command line
-
hf download hf://ken-jo/qev/load_qev.py
-
curl -L -o load_qev.py https://huggingface.co/ken-jo/qev/resolve/main/load_qev.py
394 Bytes
| """Run the packaged example with the latest bundled qev wheel.""" | |
| import json | |
| from pathlib import Path | |
| import torch | |
| from qev import load, DecisionRequest | |
| root = Path(__file__).resolve().parent | |
| torch.set_num_threads(4) | |
| model = load(root) | |
| request = DecisionRequest.from_json((root / "sample_request.json").read_text("utf-8")) | |
| print(json.dumps(model.predict(request, root), indent=2)) | |