Lee Henriques commited on
Commit
2dfd49c
Β·
1 Parent(s): fb9c00c
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -381,7 +381,7 @@ def render_sidebar():
381
  st.markdown("**Eigen-IG**")
382
  eigen_components = st.slider("Number of principal components", 1, 12, 5, 1)
383
 
384
- run_btn = st.button("β–Ά Run Analysis", use_column_width=True)
385
 
386
  return {
387
  "model_name": model_name,
@@ -577,7 +577,7 @@ def run_batch_benchmark(model, config, cfg, labels, device):
577
 
578
  st.markdown("#### Results summary (mean Β± std)")
579
  summary = df.groupby("method")[["deletion_auc", "insertion_auc", "infidelity"]].agg(["mean", "std"]).round(4)
580
- st.dataframe(summary, use_column_width=True)
581
 
582
  csv_bytes = df.to_csv(index=False).encode()
583
  st.download_button(
@@ -586,9 +586,9 @@ def run_batch_benchmark(model, config, cfg, labels, device):
586
  file_name="xai_benchmark_results.csv",
587
  mime="text/csv",
588
  type="primary",
589
- use_column_width=True,
590
  )
591
- st.dataframe(df, use_column_width=True)
592
 
593
  # ─── Main ─────────────────────────────────────────────────────────────────────
594
 
@@ -731,11 +731,11 @@ def main():
731
  st.info("Click **β–Ά Run Analysis** in the sidebar to compute attributions.")
732
  col1, col2 = st.columns([1, 2])
733
  with col1:
734
- st.image(display_img, caption="Input Image", use_column_width=True).use_column_width
735
  with col2:
736
  st.plotly_chart(
737
  plot_top_predictions(probs, labels, top_k=5),
738
- use_column_width=True,
739
  )
740
  return
741
 
@@ -796,12 +796,12 @@ def main():
796
  colormap=cfg["colormap"],
797
  alpha=cfg["alpha"],
798
  )
799
- st.image(fig_to_pil(fig), use_column_width=True).use_column_width
800
 
801
  st.markdown("#### Top-5 Predictions")
802
  st.plotly_chart(
803
  plot_top_predictions(probs, labels, top_k=5),
804
- use_column_width=True,
805
  )
806
 
807
  # ── Tab 2: Individual interactive maps ─────────────────────────────────────
@@ -889,7 +889,7 @@ def main():
889
  ann.font.color = "white"
890
  fig.update_xaxes(gridcolor="#2a2f3e")
891
  fig.update_yaxes(gridcolor="#2a2f3e")
892
- st.plotly_chart(fig, use_column_width=True)
893
 
894
  # ── Tab 4: Method Info ─────────────────────────────────────────────────────
895
  with tabs[3]:
 
381
  st.markdown("**Eigen-IG**")
382
  eigen_components = st.slider("Number of principal components", 1, 12, 5, 1)
383
 
384
+ run_btn = st.button("β–Ά Run Analysis", use_container_width=True)
385
 
386
  return {
387
  "model_name": model_name,
 
577
 
578
  st.markdown("#### Results summary (mean Β± std)")
579
  summary = df.groupby("method")[["deletion_auc", "insertion_auc", "infidelity"]].agg(["mean", "std"]).round(4)
580
+ st.dataframe(summary, use_container_width=True)
581
 
582
  csv_bytes = df.to_csv(index=False).encode()
583
  st.download_button(
 
586
  file_name="xai_benchmark_results.csv",
587
  mime="text/csv",
588
  type="primary",
589
+ use_container_width=True,
590
  )
591
+ st.dataframe(df, use_container_width=True)
592
 
593
  # ─── Main ─────────────────────────────────────────────────────────────────────
594
 
 
731
  st.info("Click **β–Ά Run Analysis** in the sidebar to compute attributions.")
732
  col1, col2 = st.columns([1, 2])
733
  with col1:
734
+ st.image(display_img, caption="Input Image", use_column_width=True)
735
  with col2:
736
  st.plotly_chart(
737
  plot_top_predictions(probs, labels, top_k=5),
738
+ use_container_width=True,
739
  )
740
  return
741
 
 
796
  colormap=cfg["colormap"],
797
  alpha=cfg["alpha"],
798
  )
799
+ st.image(fig_to_pil(fig), use_column_width=True)
800
 
801
  st.markdown("#### Top-5 Predictions")
802
  st.plotly_chart(
803
  plot_top_predictions(probs, labels, top_k=5),
804
+ use_container_width=True,
805
  )
806
 
807
  # ── Tab 2: Individual interactive maps ─────────────────────────────────────
 
889
  ann.font.color = "white"
890
  fig.update_xaxes(gridcolor="#2a2f3e")
891
  fig.update_yaxes(gridcolor="#2a2f3e")
892
+ st.plotly_chart(fig, use_container_width=True)
893
 
894
  # ── Tab 4: Method Info ─────────────────────────────────────────────────────
895
  with tabs[3]: