JohanBeytell commited on
Commit
4165048
·
verified ·
1 Parent(s): 096bbc6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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((256, 256)) # 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
 
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