sensei-ml commited on
Commit
6059147
·
verified ·
1 Parent(s): d5cf581

Update model/model.py

Browse files
Files changed (1) hide show
  1. model/model.py +1 -1
model/model.py CHANGED
@@ -11,7 +11,7 @@ def predict(image_path):
11
  image = Image.fromarray(image_path)
12
  image = image.convert('L')
13
  image = image.resize((150, 150)) # Resize to match your model's input size
14
- img_array = np.array(imgage) / 255.0 # Normalize pixel values
15
  img_array = np.expand_dims(image_array, axis=0) # Add batch dimension
16
  prediction = model.predict(img_array)
17
  predicted_class_index = np.argmax(prediction)
 
11
  image = Image.fromarray(image_path)
12
  image = image.convert('L')
13
  image = image.resize((150, 150)) # Resize to match your model's input size
14
+ img_array = np.array(image) / 255.0 # Normalize pixel values
15
  img_array = np.expand_dims(image_array, axis=0) # Add batch dimension
16
  prediction = model.predict(img_array)
17
  predicted_class_index = np.argmax(prediction)