nielsr HF staff commited on
Commit
f81d411
1 Parent(s): 1ee07a4

Fix typo in code example

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -32,13 +32,13 @@ fine-tuned versions on a task that interests you.
32
  Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:
33
 
34
  ```python
35
- from transformers import BEiTFeatureExtractor, BEiTForImageClassification
36
  from PIL import Image
37
  import requests
38
  url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
39
  image = Image.open(requests.get(url, stream=True).raw)
40
- feature_extractor = BEiTFeatureExtractor.from_pretrained('microsoft/beit-large-patch16-224-pt22k-ft22k')
41
- model = BEiTForImageClassification.from_pretrained('microsoft/beit-large-patch16-224-pt22k-ft22k')
42
  inputs = feature_extractor(images=image, return_tensors="pt")
43
  outputs = model(**inputs)
44
  logits = outputs.logits
 
32
  Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:
33
 
34
  ```python
35
+ from transformers import BeitFeatureExtractor, BeitForImageClassification
36
  from PIL import Image
37
  import requests
38
  url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
39
  image = Image.open(requests.get(url, stream=True).raw)
40
+ feature_extractor = BeitFeatureExtractor.from_pretrained('microsoft/beit-large-patch16-224-pt22k-ft22k')
41
+ model = BeitForImageClassification.from_pretrained('microsoft/beit-large-patch16-224-pt22k-ft22k')
42
  inputs = feature_extractor(images=image, return_tensors="pt")
43
  outputs = model(**inputs)
44
  logits = outputs.logits