xxxxxx commited on
Commit
8bb6322
·
1 Parent(s): 7e080a1
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -61,7 +61,7 @@ with col1:
61
  if text_input:
62
  with st.spinner("正在分析..."):
63
  results = classify_text(text_input)
64
- st.json(results)
65
  for model, result in results.items():
66
  st.subheader(f"{model.upper()} 模型分类结果:")
67
  label = "垃圾信息" if result["label"] == "normal" else "正常信息"
@@ -70,7 +70,8 @@ with col1:
70
  else:
71
  st.success(f"✅ {label}")
72
  st.write(f"概率: {result['confidence']:.2f}")
73
- st.progress(result['confidence'])
 
74
  else:
75
  st.warning("请输入文本后再进行分类。")
76
 
 
61
  if text_input:
62
  with st.spinner("正在分析..."):
63
  results = classify_text(text_input)
64
+
65
  for model, result in results.items():
66
  st.subheader(f"{model.upper()} 模型分类结果:")
67
  label = "垃圾信息" if result["label"] == "normal" else "正常信息"
 
70
  else:
71
  st.success(f"✅ {label}")
72
  st.write(f"概率: {result['confidence']:.2f}")
73
+ st.write(f"详细输出: {json.dumps(result, ensure_ascii=False)}")
74
+ st.markdown("---")
75
  else:
76
  st.warning("请输入文本后再进行分类。")
77