Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -27,6 +27,8 @@ def preprocess_image(img):
|
|
27 |
def predict_input_image(img):
|
28 |
# Preprocess the input image
|
29 |
img = preprocess_image(img)
|
|
|
|
|
30 |
|
31 |
# Load the pre-trained model
|
32 |
model = tf.keras.models.load_model('Tumor_Model.h5')
|
|
|
27 |
def predict_input_image(img):
|
28 |
# Preprocess the input image
|
29 |
img = preprocess_image(img)
|
30 |
+
img = tf.image.resize(img, [224,224])
|
31 |
+
img = np.expand_dims(img, axis = 0)
|
32 |
|
33 |
# Load the pre-trained model
|
34 |
model = tf.keras.models.load_model('Tumor_Model.h5')
|