Kalbe-x-Bangkit
commited on
Commit
•
24201d7
1
Parent(s):
2ed76b8
Update app.py
Browse files
app.py
CHANGED
@@ -494,10 +494,10 @@ if uploaded_file is not None:
|
|
494 |
with col3:
|
495 |
if st.button('Generate Grad-CAM'):
|
496 |
st.write("Loading model...")
|
497 |
-
|
498 |
# Compute and show Grad-CAM
|
499 |
st.write("Generating Grad-CAM visualizations")
|
500 |
try:
|
501 |
-
compute_gradcam(
|
502 |
except Exception as e:
|
503 |
st.error(f"Error generating Grad-CAM: {e}")
|
|
|
494 |
with col3:
|
495 |
if st.button('Generate Grad-CAM'):
|
496 |
st.write("Loading model...")
|
497 |
+
model_gradcam = keras.models.load_model('./gradcam_model.h5')
|
498 |
# Compute and show Grad-CAM
|
499 |
st.write("Generating Grad-CAM visualizations")
|
500 |
try:
|
501 |
+
compute_gradcam(model_gradcam, uploaded_file)
|
502 |
except Exception as e:
|
503 |
st.error(f"Error generating Grad-CAM: {e}")
|