Elegbede commited on
Commit
a70b7b1
1 Parent(s): 1b96c12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -6,11 +6,10 @@ from tensorflow.keras.preprocessing import image
6
 
7
 
8
 
9
- def predict_input_image(img_path):
10
- img = Image.open(img_path)
11
- img = img.resize((224, 224,3))
12
- img_array = image.img_to_array(img)
13
- img_array = np.expand_dims(img_array, axis=0) # Reshape the image to match the model input
14
 
15
  # Make predictions
16
  model = tf.keras.models.load_model('Tumor_Model.h5')
 
6
 
7
 
8
 
9
+ def predict_input_image(img):
10
+
11
+ img = img.reshape(-1,224,224,3)
12
+
 
13
 
14
  # Make predictions
15
  model = tf.keras.models.load_model('Tumor_Model.h5')