Instructions to use SupremoUGH/image-classification-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SupremoUGH/image-classification-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="SupremoUGH/image-classification-model") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("SupremoUGH/image-classification-model") model = AutoModelForImageClassification.from_pretrained("SupremoUGH/image-classification-model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| from transformers import ViTForImageClassification | |
| import os | |
| ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) | |
| def load_model(): | |
| return ViTForImageClassification.from_pretrained(ROOT_DIR) | |