Instructions to use dnnsdunca/UANN with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Adapters
How to use dnnsdunca/UANN with Adapters:
from adapters import AutoAdapterModel model = AutoAdapterModel.from_pretrained("<base-model-id>") model.load_adapter("dnnsdunca/UANN", set_active=True) - Notebooks
- Google Colab
- Kaggle
Download Helper_functions.py from dnnsdunca/UANN: direct link, hf CLI and curl.
- Browser
- Download file 220 Bytes
-
https://huggingface.co/dnnsdunca/UANN/resolve/main/Helper_functions.py
- Command line
-
hf download hf://dnnsdunca/UANN/Helper_functions.py
-
curl -L -o Helper_functions.py https://huggingface.co/dnnsdunca/UANN/resolve/main/Helper_functions.py
220 Bytes
| # utils/helper_functions.py | |
| import torch | |
| def save_model(model, path): | |
| torch.save(model.state_dict(), path) | |
| def load_model(model, path): | |
| model.load_state_dict(torch.load(path)) | |
| model.eval() | |
| return model | |