Update README.md
Browse files
README.md
CHANGED
|
@@ -161,11 +161,12 @@ class CustomViTForImageClassification(ViTForImageClassification):
|
|
| 161 |
attentions=outputs.attentions,
|
| 162 |
)
|
| 163 |
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
|
|
|
| 171 |
```
|
|
|
|
| 161 |
attentions=outputs.attentions,
|
| 162 |
)
|
| 163 |
|
| 164 |
+
if __name__ == "__main__":
|
| 165 |
+
|
| 166 |
+
model = CustomViTForImageClassification.from_pretrained("vesteinn/vit-mae-inat21")
|
| 167 |
+
image_processor = AutoImageProcessor.from_pretrained("vesteinn/vit-mae-inat21")
|
| 168 |
+
|
| 169 |
+
classifier = pipeline(
|
| 170 |
+
"image-classification", model=model, image_processor=image_processor
|
| 171 |
+
)
|
| 172 |
```
|