Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,12 @@ from PIL import Image
|
|
5 |
# Initialize the plant disease classification pipeline
|
6 |
# You can replace the model with any fine-tuned plant disease model hosted on Hugging Face
|
7 |
plant_disease_classifier = pipeline(
|
8 |
-
task="image-classification",
|
9 |
-
model="
|
10 |
-
top_k=3
|
11 |
)
|
12 |
|
|
|
13 |
def diagnose_plant_health(image: Image.Image):
|
14 |
"""
|
15 |
Takes a PIL Image of a plant leaf and returns:
|
|
|
5 |
# Initialize the plant disease classification pipeline
|
6 |
# You can replace the model with any fine-tuned plant disease model hosted on Hugging Face
|
7 |
plant_disease_classifier = pipeline(
|
8 |
+
task="image-classification",
|
9 |
+
model="wambugu71/crop_leaf_diseases_vit",
|
10 |
+
top_k=3
|
11 |
)
|
12 |
|
13 |
+
|
14 |
def diagnose_plant_health(image: Image.Image):
|
15 |
"""
|
16 |
Takes a PIL Image of a plant leaf and returns:
|