Fix typo
Browse files
README.md
CHANGED
@@ -30,16 +30,16 @@ fine-tuned versions on a task that interests you.
|
|
30 |
|
31 |
### How to use
|
32 |
|
33 |
-
Here is how to use this model
|
34 |
|
35 |
```python
|
36 |
-
from transformers import ViTFeatureExtractor,
|
37 |
from PIL import Image
|
38 |
import requests
|
39 |
url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
|
40 |
image = Image.open(requests.get(url, stream=True).raw)
|
41 |
feature_extractor = ViTFeatureExtractor.from_pretrained('google/vit-base-patch16-224-in21k')
|
42 |
-
model =
|
43 |
inputs = feature_extractor(images=image, return_tensors="pt")
|
44 |
outputs = model(**inputs)
|
45 |
last_hidden_state = outputs.last_hidden_state
|
|
|
30 |
|
31 |
### How to use
|
32 |
|
33 |
+
Here is how to use this model:
|
34 |
|
35 |
```python
|
36 |
+
from transformers import ViTFeatureExtractor, ViTModel
|
37 |
from PIL import Image
|
38 |
import requests
|
39 |
url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
|
40 |
image = Image.open(requests.get(url, stream=True).raw)
|
41 |
feature_extractor = ViTFeatureExtractor.from_pretrained('google/vit-base-patch16-224-in21k')
|
42 |
+
model = ViTModel.from_pretrained('google/vit-base-patch16-224-in21k')
|
43 |
inputs = feature_extractor(images=image, return_tensors="pt")
|
44 |
outputs = model(**inputs)
|
45 |
last_hidden_state = outputs.last_hidden_state
|