Spaces:
Running
Running
SarowarSaurav
commited on
Commit
•
43c8e35
1
Parent(s):
7b15e8e
Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,11 @@ import torch
|
|
4 |
from PIL import Image
|
5 |
|
6 |
# Load the image processor and model
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
9 |
|
10 |
# Define the function to process the image and make predictions
|
11 |
def classify_leaf_disease(image):
|
|
|
4 |
from PIL import Image
|
5 |
|
6 |
# Load the image processor and model
|
7 |
+
# Load model directly
|
8 |
+
from transformers import AutoImageProcessor, AutoModelForImageClassification
|
9 |
+
|
10 |
+
processor = AutoImageProcessor.from_pretrained("linkanjarad/mobilenet_v2_1.0_224-plant-disease-identification")
|
11 |
+
model = AutoModelForImageClassification.from_pretrained("linkanjarad/mobilenet_v2_1.0_224-plant-disease-identification")
|
12 |
|
13 |
# Define the function to process the image and make predictions
|
14 |
def classify_leaf_disease(image):
|