sbmaruf commited on
Commit
6f0444d
·
1 Parent(s): cefec48

update command

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -730,7 +730,7 @@ def main():
730
  # Detailed Safety Breakdown
731
  # st.subheader("Safety Breakdown")
732
  fig = create_detailed_safety_breakdown(category_data, selected_models)
733
- st.plotly_chart(fig, use_container_width=True)
734
  st.markdown("""
735
  This stacked bar chart shows the detailed breakdown of safety performance for each model,
736
  displaying the proportion of responses in each safety category (Safe, Slightly Unsafe,
@@ -740,7 +740,7 @@ def main():
740
  # Model Safety by Category (Bar Chart) - Added to Overview
741
  st.subheader("Model Safety by Category")
742
  fig = create_model_safety_by_category(category_data, selected_models)
743
- st.plotly_chart(fig, use_container_width=True, config={'displayModeBar': False})
744
  st.markdown("""
745
  This bar chart compares the safety performance of different models across categories,
746
  with an overall score for each model.
@@ -752,12 +752,12 @@ def main():
752
 
753
  with col1:
754
  fig = create_category_radar_chart(category_data, selected_models)
755
- st.plotly_chart(fig, use_container_width=True, config={'displayModeBar': False})
756
  st.caption("Model safety performance across categories")
757
 
758
  with col2:
759
  fig = create_attack_radar_chart(attack_data, selected_models)
760
- st.plotly_chart(fig, use_container_width=True, config={'displayModeBar': False})
761
  st.caption("Model safety performance against attack types")
762
 
763
  # Category Analysis Tab
@@ -769,21 +769,21 @@ def main():
769
 
770
  with category_tabs[0]:
771
  st.subheader("Category Safety Heatmap")
772
- st.plotly_chart(create_category_safety_heatmap(category_data, selected_models), use_container_width=True)
773
  st.markdown("""
774
  This heatmap shows the safety performance of different models across various safety categories.
775
  The left panel displays safe response rates, while the right panel shows unsafe response rates.
776
  """)
777
  with category_tabs[1]:
778
  st.subheader("Category Comparative Chart")
779
- st.plotly_chart(create_category_radar_chart(category_data, selected_models), use_container_width=True)
780
  st.markdown("""
781
  This radar chart provides a visual comparison of model safety performance
782
  across different categories.
783
  """)
784
  with category_tabs[2]:
785
  st.subheader("Category Radar Chart")
786
- st.plotly_chart(create_category_radar_chart(category_data, selected_models), use_container_width=True)
787
  st.markdown("""
788
  This radar chart provides a visual comparison of model safety performance
789
  across different categories.
@@ -806,7 +806,7 @@ def main():
806
 
807
  with attack_tabs[0]:
808
  st.subheader("Attack Safety Heatmap")
809
- st.plotly_chart(create_attack_safety_heatmap(attack_data, selected_models), use_container_width=True)
810
  st.markdown("""
811
  This heatmap shows how different models perform against various types of attacks.
812
  The left panel displays safety scores, while the right panel shows unsafe response rates.
@@ -814,7 +814,7 @@ def main():
814
 
815
  with attack_tabs[1]:
816
  st.subheader("Attack Comparative Chart")
817
- st.plotly_chart(create_attack_comparative_chart(attack_data, selected_models), use_container_width=True)
818
  st.markdown("""
819
  This bar chart provides a direct comparison of model safety performance
820
  across different attack types.
@@ -822,7 +822,7 @@ def main():
822
 
823
  with attack_tabs[2]:
824
  st.subheader("Attack Radar Chart")
825
- st.plotly_chart(create_attack_radar_chart(attack_data, selected_models), use_container_width=True)
826
  st.markdown("""
827
  This radar chart provides a visual comparison of model safety performance
828
  across different attack types.
@@ -913,7 +913,7 @@ def main():
913
  margin=dict(l=20, r=20, t=20, b=20)
914
  )
915
 
916
- st.plotly_chart(fig, use_container_width=True, config={'displayModeBar': False})
917
 
918
  with col2:
919
  st.subheader(f"{model} Attack Resistance")
@@ -941,7 +941,7 @@ def main():
941
  margin=dict(l=20, r=20, t=20, b=20)
942
  )
943
 
944
- st.plotly_chart(fig, use_container_width=True, config={'displayModeBar': False})
945
 
946
  st.subheader("Safety Response Breakdown")
947
 
 
730
  # Detailed Safety Breakdown
731
  # st.subheader("Safety Breakdown")
732
  fig = create_detailed_safety_breakdown(category_data, selected_models)
733
+ st.plotly_chart(fig, use_container_width=True, key=1)
734
  st.markdown("""
735
  This stacked bar chart shows the detailed breakdown of safety performance for each model,
736
  displaying the proportion of responses in each safety category (Safe, Slightly Unsafe,
 
740
  # Model Safety by Category (Bar Chart) - Added to Overview
741
  st.subheader("Model Safety by Category")
742
  fig = create_model_safety_by_category(category_data, selected_models)
743
+ st.plotly_chart(fig, use_container_width=True, config={'displayModeBar': False}, key=2)
744
  st.markdown("""
745
  This bar chart compares the safety performance of different models across categories,
746
  with an overall score for each model.
 
752
 
753
  with col1:
754
  fig = create_category_radar_chart(category_data, selected_models)
755
+ st.plotly_chart(fig, use_container_width=True, config={'displayModeBar': False}, key=3)
756
  st.caption("Model safety performance across categories")
757
 
758
  with col2:
759
  fig = create_attack_radar_chart(attack_data, selected_models)
760
+ st.plotly_chart(fig, use_container_width=True, config={'displayModeBar': False}, key=4)
761
  st.caption("Model safety performance against attack types")
762
 
763
  # Category Analysis Tab
 
769
 
770
  with category_tabs[0]:
771
  st.subheader("Category Safety Heatmap")
772
+ st.plotly_chart(create_category_safety_heatmap(category_data, selected_models), use_container_width=True, key=5)
773
  st.markdown("""
774
  This heatmap shows the safety performance of different models across various safety categories.
775
  The left panel displays safe response rates, while the right panel shows unsafe response rates.
776
  """)
777
  with category_tabs[1]:
778
  st.subheader("Category Comparative Chart")
779
+ st.plotly_chart(create_category_radar_chart(category_data, selected_models), use_container_width=True, key=6)
780
  st.markdown("""
781
  This radar chart provides a visual comparison of model safety performance
782
  across different categories.
783
  """)
784
  with category_tabs[2]:
785
  st.subheader("Category Radar Chart")
786
+ st.plotly_chart(create_category_radar_chart(category_data, selected_models), use_container_width=True, key=7)
787
  st.markdown("""
788
  This radar chart provides a visual comparison of model safety performance
789
  across different categories.
 
806
 
807
  with attack_tabs[0]:
808
  st.subheader("Attack Safety Heatmap")
809
+ st.plotly_chart(create_attack_safety_heatmap(attack_data, selected_models), use_container_width=True, key=8)
810
  st.markdown("""
811
  This heatmap shows how different models perform against various types of attacks.
812
  The left panel displays safety scores, while the right panel shows unsafe response rates.
 
814
 
815
  with attack_tabs[1]:
816
  st.subheader("Attack Comparative Chart")
817
+ st.plotly_chart(create_attack_comparative_chart(attack_data, selected_models), use_container_width=True, key=9)
818
  st.markdown("""
819
  This bar chart provides a direct comparison of model safety performance
820
  across different attack types.
 
822
 
823
  with attack_tabs[2]:
824
  st.subheader("Attack Radar Chart")
825
+ st.plotly_chart(create_attack_radar_chart(attack_data, selected_models), use_container_width=True, key=10)
826
  st.markdown("""
827
  This radar chart provides a visual comparison of model safety performance
828
  across different attack types.
 
913
  margin=dict(l=20, r=20, t=20, b=20)
914
  )
915
 
916
+ st.plotly_chart(fig, use_container_width=True, config={'displayModeBar': False}, key=11)
917
 
918
  with col2:
919
  st.subheader(f"{model} Attack Resistance")
 
941
  margin=dict(l=20, r=20, t=20, b=20)
942
  )
943
 
944
+ st.plotly_chart(fig, use_container_width=True, config={'displayModeBar': False}, key=12)
945
 
946
  st.subheader("Safety Response Breakdown")
947