Update README.md
Browse files
README.md
CHANGED
@@ -19,6 +19,17 @@ datasets:
|
|
19 |
- A2H0H0R1/plant-disease-new
|
20 |
license: apache-2.0
|
21 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
# Model Trained Using AutoTrain
|
24 |
|
|
|
19 |
- A2H0H0R1/plant-disease-new
|
20 |
license: apache-2.0
|
21 |
---
|
22 |
+
#Inference Pipeline
|
23 |
+
--
|
24 |
+
from transformers import AutoModelForImageClassification, AutoProcessor
|
25 |
+
|
26 |
+
model = AutoModelForImageClassification.from_pretrained("ozair23/autotrain-w5nk2-rvmqx")
|
27 |
+
processor = AutoProcessor.from_pretrained("ozair23/autotrain-w5nk2-rvmqx")
|
28 |
+
|
29 |
+
def predict(image):
|
30 |
+
inputs = processor(images=image, return_tensors="pt")
|
31 |
+
outputs = model(**inputs)
|
32 |
+
return outputs
|
33 |
|
34 |
# Model Trained Using AutoTrain
|
35 |
|