Download testmodel.py from dshi01/convnext-tiny-224-7clss: direct link, hf CLI and curl.
- Browser
- Download file 356 Bytes
-
https://huggingface.co/dshi01/convnext-tiny-224-7clss/resolve/main/testmodel.py
- Command line
-
hf download hf://dshi01/convnext-tiny-224-7clss/testmodel.py
-
curl -L -o testmodel.py https://huggingface.co/dshi01/convnext-tiny-224-7clss/resolve/main/testmodel.py
356 Bytes
| from transformers import AutoModelForImageClassification, AutoImageProcessor | |
| m = AutoModelForImageClassification.from_pretrained("dshi01/my-benthic-classifier/convnext-tiny-224-7cls") | |
| p = AutoImageProcessor.from_pretrained("dshi01/my-benthic-classifier/convnext-tiny-224-7cls") | |
| print(m.config.model_type, m.config.num_labels) # expect convnext, 7 (if set) |