Instructions to use Zipeng365/WISP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use Zipeng365/WISP with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("Zipeng365/WISP", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
Download src/wisp_fast/native.py from Zipeng365/WISP: direct link, hf CLI and curl.
- Browser
- Download file 531 Bytes
-
https://huggingface.co/Zipeng365/WISP/resolve/main/src/wisp_fast/native.py
- Command line
-
hf download hf://Zipeng365/WISP/src/wisp_fast/native.py
-
curl -L -o native.py https://huggingface.co/Zipeng365/WISP/resolve/main/src/wisp_fast/native.py
531 Bytes
| """Look up optional CPU symbols from the installed extension or standalone C build.""" | |
| import ctypes | |
| from importlib.util import find_spec | |
| from pathlib import Path | |
| def lookup(symbol): | |
| ext = find_spec("wisp_fast._kernels") | |
| paths = [ext.origin] if ext is not None and ext.origin else [] | |
| paths.append(Path(__file__).with_name("_wisp_viterbi.so")) | |
| for path in paths: | |
| try: | |
| return getattr(ctypes.CDLL(str(path)), symbol) | |
| except (OSError, AttributeError): | |
| continue | |
| return None | |