lewtun/dog_food
Viewer • Updated • 3k • 69 • 5
How to use amalla2/dog-food-fine with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="amalla2/dog-food-fine")
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("amalla2/dog-food-fine")
model = AutoModelForImageClassification.from_pretrained("amalla2/dog-food-fine", device_map="auto")