aeresd commited on
Commit
32f4abb
·
verified ·
1 Parent(s): 28ef08c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
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
- radar_fig = px.line_polar(radar_df, r='Score', theta='Category', line_close=True, title="⚠️ Risk Radar by Category")
 
 
 
 
 
 
 
 
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.")