ozair23's picture
Update README.md
1b52cca verified
metadata
tags:
  - autotrain
  - image-classification
  - pytorch
  - transformers
library_name: pytorch
base_model: microsoft/resnet-50
widget:
  - src: >-
      https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg
    example_title: Tiger
  - src: >-
      https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg
    example_title: Teapot
  - src: >-
      https://huggingface.co/datasets/mishig/sample_images/resolve/main/palace.jpg
    example_title: Palace
datasets:
  - A2H0H0R1/plant-disease-new
license: apache-2.0

Model Trained Using AutoTrain

  • Problem type: Image Classification

Validation Metrics

No validation metrics available

#Inference Pipeline

-Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:

from transformers import AutoModelForImageClassification, AutoProcessor

model = AutoModelForImageClassification.from_pretrained("ozair23/autotrain-w5nk2-rvmqx")
processor = AutoProcessor.from_pretrained("ozair23/autotrain-w5nk2-rvmqx")

def predict(image):
    inputs = processor(images=image, return_tensors="pt")
    outputs = model(**inputs)
    return outputs