Orawan commited on
Commit
bc4bdd7
·
1 Parent(s): 1b88637

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -22,6 +22,9 @@ if st.button("ตรวจสอบ"):
22
  # แสดงผลลัพธ์
23
  st.write("ผลลัพธ์:")
24
  st.write(f"ข้อความ: {user_input}")
 
 
 
25
  st.write(f"แสปม: {result[0]['label']}")
26
  st.write(f"ความมั่นใจ: {result[0]['score']}")
27
  else:
 
22
  # แสดงผลลัพธ์
23
  st.write("ผลลัพธ์:")
24
  st.write(f"ข้อความ: {user_input}")
25
+
26
+ # แก้ไขข้อความ "Staff" เป็น "Spam"
27
+ label = "Spam" if result[0]['label'] == 'Staff' else result[0]['label']
28
  st.write(f"แสปม: {result[0]['label']}")
29
  st.write(f"ความมั่นใจ: {result[0]['score']}")
30
  else: