Update README.md

#3
by sapfear - opened
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -30,15 +30,15 @@ You can use the raw model for image classification. See the [model hub](https://
30
  Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:
31
 
32
  ```python
33
- from transformers import MobileViTv2FeatureExtractor, MobileViTv2ForImageClassification
34
  from PIL import Image
35
  import requests
36
 
37
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
38
  image = Image.open(requests.get(url, stream=True).raw)
39
 
40
- feature_extractor = MobileViTv2FeatureExtractor.from_pretrained("shehan97/mobilevitv2-1.0-imagenet1k-256")
41
- model = MobileViTv2ForImageClassification.from_pretrained("shehan97/mobilevitv2-1.0-imagenet1k-256")
42
 
43
  inputs = feature_extractor(images=image, return_tensors="pt")
44
 
 
30
  Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:
31
 
32
  ```python
33
+ from transformers import MobileViTImageProcessor, MobileViTV2ForImageClassification
34
  from PIL import Image
35
  import requests
36
 
37
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
38
  image = Image.open(requests.get(url, stream=True).raw)
39
 
40
+ feature_extractor = MobileViTImageProcessor.from_pretrained("shehan97/mobilevitv2-1.0-imagenet1k-256")
41
+ model = MobileViTV2ForImageClassification.from_pretrained("shehan97/mobilevitv2-1.0-imagenet1k-256")
42
 
43
  inputs = feature_extractor(images=image, return_tensors="pt")
44