Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def predict(img) -> Tuple[Dict,float] :
|
|
37 |
image = load_and_prep_imgg(img)
|
38 |
image = Image.open(image)
|
39 |
|
40 |
-
pred_img = model.predict(tf.expand_dims(
|
41 |
pred_class = class_names[pred_img.argmax()]
|
42 |
st.write(f"Predicted brain tumor is: {pred_class} with probability: {pred_img.max():.2f}")
|
43 |
|
|
|
37 |
image = load_and_prep_imgg(img)
|
38 |
image = Image.open(image)
|
39 |
|
40 |
+
pred_img = model.predict(tf.expand_dims(image, axis=0))
|
41 |
pred_class = class_names[pred_img.argmax()]
|
42 |
st.write(f"Predicted brain tumor is: {pred_class} with probability: {pred_img.max():.2f}")
|
43 |
|