Instructions to use optimum/vit-base-patch16-224 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use optimum/vit-base-patch16-224 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="optimum/vit-base-patch16-224") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("optimum/vit-base-patch16-224") model = AutoModelForImageClassification.from_pretrained("optimum/vit-base-patch16-224", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Specify the head of the model in the model card (#2)
- Specify the head of the model in the model card (f83e01636e1335dd07330eaa06a99a5456333d8e) - Update code snippet (c9ee1c31e23054aeb94b8bd83036b52e9f211e99)781f5c2
-
Update README.md
95b5a98 -
First model version
91bedb6 -
initial commit
133ac17