Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ class_labels = ['Potato___Early_blight', 'Potato___Late_blight', 'Potato___healt
|
|
12 |
|
13 |
def classify_potato_plant(img):
|
14 |
# Preprocess the image for the model
|
15 |
-
img = img.resize((
|
16 |
img = image.img_to_array(img)
|
17 |
img = np.expand_dims(img, axis=0)
|
18 |
img = img / 255.0 # Normalize the image
|
|
|
12 |
|
13 |
def classify_potato_plant(img):
|
14 |
# Preprocess the image for the model
|
15 |
+
img = img.resize((128, 128)) # Resize to the same size the model was trained on
|
16 |
img = image.img_to_array(img)
|
17 |
img = np.expand_dims(img, axis=0)
|
18 |
img = img / 255.0 # Normalize the image
|