Update app.py
Browse files
app.py
CHANGED
@@ -109,7 +109,15 @@ if st.session_state.history:
|
|
109 |
"Category": ["Insult","Abuse","Discrimination","Hate Speech","Vulgarity"],
|
110 |
"Score": [0.7,0.4,0.3,0.5,0.6]
|
111 |
})
|
112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
st.plotly_chart(radar_fig)
|
114 |
else:
|
115 |
-
st.info("⚠️ No data available. Please analyze some text first.")
|
|
|
109 |
"Category": ["Insult","Abuse","Discrimination","Hate Speech","Vulgarity"],
|
110 |
"Score": [0.7,0.4,0.3,0.5,0.6]
|
111 |
})
|
112 |
+
# 优化雷达图,设置线条为黑色
|
113 |
+
radar_fig = px.line_polar(
|
114 |
+
radar_df,
|
115 |
+
r='Score',
|
116 |
+
theta='Category',
|
117 |
+
line_close=True,
|
118 |
+
title="⚠️ Risk Radar by Category",
|
119 |
+
color_discrete_sequence=['black']
|
120 |
+
)
|
121 |
st.plotly_chart(radar_fig)
|
122 |
else:
|
123 |
+
st.info("⚠️ No data available. Please analyze some text first.")
|