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