Update README.md
Browse files
README.md
CHANGED
@@ -42,6 +42,10 @@ classifier = VisionClassifierInference(
|
|
42 |
feature_extractor = ViTFeatureExtractor.from_pretrained(path),
|
43 |
model = ViTForImageClassification.from_pretrained(path),
|
44 |
)
|
|
|
|
|
|
|
|
|
45 |
```
|
46 |
|
47 |
> Disclaimer: This model was trained for research only
|
|
|
42 |
feature_extractor = ViTFeatureExtractor.from_pretrained(path),
|
43 |
model = ViTForImageClassification.from_pretrained(path),
|
44 |
)
|
45 |
+
|
46 |
+
img = "Your image path"
|
47 |
+
label = classifier.predict(img_path=img)
|
48 |
+
print("Predicted class:", label)
|
49 |
```
|
50 |
|
51 |
> Disclaimer: This model was trained for research only
|