broadwell commited on
Commit
1922759
1 Parent(s): 83fd6ba

Display original image along with activation gradient overlay version

Browse files
Files changed (1) hide show
  1. CLIP_Explainability/app.py +4 -2
CLIP_Explainability/app.py CHANGED
@@ -1,4 +1,4 @@
1
- from base64 import b64encode
2
  from io import BytesIO
3
  from math import ceil
4
 
@@ -430,7 +430,7 @@ def visualize_gradcam(image):
430
 
431
  header_cols = st.columns([80, 20], vertical_alignment="bottom")
432
  with header_cols[0]:
433
- st.title("Image + query details")
434
  with header_cols[1]:
435
  if st.button("Close"):
436
  st.rerun()
@@ -457,6 +457,8 @@ def visualize_gradcam(image):
457
  st.session_state.search_field_value
458
  )
459
 
 
 
460
  with st.spinner("Calculating..."):
461
  # info_text = st.text("Calculating activation regions...")
462
 
 
1
+ # from base64 import b64encode
2
  from io import BytesIO
3
  from math import ceil
4
 
 
430
 
431
  header_cols = st.columns([80, 20], vertical_alignment="bottom")
432
  with header_cols[0]:
433
+ st.title("Image + query activation gradients")
434
  with header_cols[1]:
435
  if st.button("Close"):
436
  st.rerun()
 
457
  st.session_state.search_field_value
458
  )
459
 
460
+ st.image(image)
461
+
462
  with st.spinner("Calculating..."):
463
  # info_text = st.text("Calculating activation regions...")
464