AK51 commited on
Commit
e71489e
Β·
verified Β·
1 Parent(s): b5341f3

Upload 3 files

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +7 -11
  3. requirements.txt +5 -5
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: πŸ”
4
  colorFrom: blue
5
  colorTo: purple
6
  sdk: streamlit
7
- sdk_version: 1.37.0
8
  app_file: app.py
9
  pinned: false
10
  license: mit
 
4
  colorFrom: blue
5
  colorTo: purple
6
  sdk: streamlit
7
+ sdk_version: 1.36.0
8
  app_file: app.py
9
  pinned: false
10
  license: mit
app.py CHANGED
@@ -416,8 +416,7 @@ def main():
416
  # --- Help & Credits ---
417
  st.sidebar.markdown("---")
418
 
419
- @st.dialog("πŸ“– Help β€” Image File Compare", width="large")
420
- def show_help():
421
  st.markdown("""
422
  ## Overview
423
 
@@ -491,9 +490,6 @@ Choose whether output images are saved as:
491
  - **Overlay on Original:** The colored overlay blended onto Image 1 at adjustable opacity, helping you localize differences in context.
492
  """)
493
 
494
- if st.sidebar.button("❓ Help", use_container_width=True):
495
- show_help()
496
-
497
  st.sidebar.markdown("---")
498
  st.sidebar.markdown(
499
  "<div style='text-align: center; color: gray; font-size: 0.85em;'>"
@@ -603,10 +599,10 @@ Choose whether output images are saved as:
603
  col1, col2 = st.columns(2)
604
  with col1:
605
  st.markdown(f"**Image 1:** `{img1_name}`")
606
- st.image(to_display_image(img1_data), use_container_width=True)
607
  with col2:
608
  st.markdown(f"**Image 2:** `{img2_name}`")
609
- st.image(to_display_image(img2_data), use_container_width=True)
610
 
611
  st.markdown("---")
612
 
@@ -629,7 +625,7 @@ Choose whether output images are saved as:
629
  mime=mime,
630
  key="dl_diff",
631
  )
632
- st.image(diff_display_uint8, use_container_width=True)
633
 
634
  st.markdown("---")
635
 
@@ -645,7 +641,7 @@ Choose whether output images are saved as:
645
  mime=mime,
646
  key="dl_mask",
647
  )
648
- st.image(mask_display, use_container_width=True,
649
  caption="White = difference > threshold")
650
 
651
  st.markdown("---")
@@ -663,7 +659,7 @@ Choose whether output images are saved as:
663
  mime=mime,
664
  key="dl_colored",
665
  )
666
- st.image(colored_mask, use_container_width=True,
667
  caption="Red = pixels exceeding threshold | Dark green = within threshold")
668
 
669
  st.markdown("---")
@@ -691,7 +687,7 @@ Choose whether output images are saved as:
691
  mime=mime,
692
  key="dl_overlay",
693
  )
694
- st.image(overlay, use_container_width=True,
695
  caption="Image 1 with difference overlay")
696
 
697
  else:
 
416
  # --- Help & Credits ---
417
  st.sidebar.markdown("---")
418
 
419
+ with st.sidebar.expander("❓ Help", expanded=False):
 
420
  st.markdown("""
421
  ## Overview
422
 
 
490
  - **Overlay on Original:** The colored overlay blended onto Image 1 at adjustable opacity, helping you localize differences in context.
491
  """)
492
 
 
 
 
493
  st.sidebar.markdown("---")
494
  st.sidebar.markdown(
495
  "<div style='text-align: center; color: gray; font-size: 0.85em;'>"
 
599
  col1, col2 = st.columns(2)
600
  with col1:
601
  st.markdown(f"**Image 1:** `{img1_name}`")
602
+ st.image(to_display_image(img1_data), use_column_width=True)
603
  with col2:
604
  st.markdown(f"**Image 2:** `{img2_name}`")
605
+ st.image(to_display_image(img2_data), use_column_width=True)
606
 
607
  st.markdown("---")
608
 
 
625
  mime=mime,
626
  key="dl_diff",
627
  )
628
+ st.image(diff_display_uint8, use_column_width=True)
629
 
630
  st.markdown("---")
631
 
 
641
  mime=mime,
642
  key="dl_mask",
643
  )
644
+ st.image(mask_display, use_column_width=True,
645
  caption="White = difference > threshold")
646
 
647
  st.markdown("---")
 
659
  mime=mime,
660
  key="dl_colored",
661
  )
662
+ st.image(colored_mask, use_column_width=True,
663
  caption="Red = pixels exceeding threshold | Dark green = within threshold")
664
 
665
  st.markdown("---")
 
687
  mime=mime,
688
  key="dl_overlay",
689
  )
690
+ st.image(overlay, use_column_width=True,
691
  caption="Image 1 with difference overlay")
692
 
693
  else:
requirements.txt CHANGED
@@ -1,5 +1,5 @@
1
- streamlit==1.37.0
2
- numpy==1.26.4
3
- Pillow==10.4.0
4
- astropy==6.1.1
5
- opencv-python-headless==4.10.0.84
 
1
+ streamlit>=1.24.0
2
+ numpy>=1.24.0
3
+ Pillow>=10.0.0
4
+ astropy>=5.3
5
+ opencv-python-headless>=4.8.0