updated
Browse files
app.py
CHANGED
|
@@ -8,8 +8,8 @@ from skimage.segmentation import mark_boundaries
|
|
| 8 |
import matplotlib.pyplot as plt
|
| 9 |
|
| 10 |
|
| 11 |
-
model = tf.keras.models.load_model("model/resnet_for_breast_cancer-v1.h5")
|
| 12 |
-
|
| 13 |
explainer = lime_image.LimeImageExplainer()
|
| 14 |
|
| 15 |
hp = {}
|
|
@@ -30,7 +30,9 @@ def main():
|
|
| 30 |
|
| 31 |
# Display the image shape
|
| 32 |
image_class = predict_single_image(image, model, hp)
|
|
|
|
| 33 |
st.write(f"Image Class: {image_class}")
|
|
|
|
| 34 |
|
| 35 |
def convert_to_opencv(uploaded_file):
|
| 36 |
# Read the uploaded file using OpenCV
|
|
|
|
| 8 |
import matplotlib.pyplot as plt
|
| 9 |
|
| 10 |
|
| 11 |
+
#model = tf.keras.models.load_model("model/resnet_for_breast_cancer-v1.h5")
|
| 12 |
+
model = from_pretrained_keras("ErnestBeckham/BreastResViT-II")
|
| 13 |
explainer = lime_image.LimeImageExplainer()
|
| 14 |
|
| 15 |
hp = {}
|
|
|
|
| 30 |
|
| 31 |
# Display the image shape
|
| 32 |
image_class = predict_single_image(image, model, hp)
|
| 33 |
+
xai_result("lime_Ex.png")
|
| 34 |
st.write(f"Image Class: {image_class}")
|
| 35 |
+
|
| 36 |
|
| 37 |
def convert_to_opencv(uploaded_file):
|
| 38 |
# Read the uploaded file using OpenCV
|