Update app.py
Browse files
app.py
CHANGED
|
@@ -101,7 +101,7 @@ if st.session_state.history:
|
|
| 101 |
df = pd.DataFrame(st.session_state.history)
|
| 102 |
st.markdown("### 🧾 历史记录详情")
|
| 103 |
for item in st.session_state.history:
|
| 104 |
-
st.markdown(f"- 🔹 **
|
| 105 |
st.markdown(f" - **Translated:** `{item['translated']}`")
|
| 106 |
st.markdown(f" - **Suggestion:** {item['reason']}")
|
| 107 |
|
|
@@ -112,4 +112,4 @@ if st.session_state.history:
|
|
| 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.")
|
|
|
|
| 101 |
df = pd.DataFrame(st.session_state.history)
|
| 102 |
st.markdown("### 🧾 历史记录详情")
|
| 103 |
for item in st.session_state.history:
|
| 104 |
+
st.markdown(f"- 🔹 **input:** `{item['text']}` | **Label:** `{item['label']}` | **Confidence:** `{item['score']:.2%}`")
|
| 105 |
st.markdown(f" - **Translated:** `{item['translated']}`")
|
| 106 |
st.markdown(f" - **Suggestion:** {item['reason']}")
|
| 107 |
|
|
|
|
| 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.")
|