Venustcs commited on
Commit
c0de470
·
verified ·
1 Parent(s): 297dfee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,8 +11,8 @@ text = st.text_area("Enter the text to classify", "")
11
  if st.button("Classify"):
12
  # Perform text classification on the input text results = classifier(text)[0]
13
  # Display the classification result
14
- max_score = float('-inf') max_label = ''
15
  for result in results:
16
  if result['score'] > max_score:
17
- max_score = result['score'] max_label = result['label']
18
- st.write("Text:", text) st.write("Label:", max_label) st.write("Score:", max_score)
 
11
  if st.button("Classify"):
12
  # Perform text classification on the input text results = classifier(text)[0]
13
  # Display the classification result
14
+ max_score = float('-inf') max_label = ''
15
  for result in results:
16
  if result['score'] > max_score:
17
+ max_score = result['score'] max_label = result['label']
18
+ st.write("Text:", text) st.write("Label:", max_label) st.write("Score:", max_score)