nebiyu29 commited on
Commit
25c2f1c
1 Parent(s): 7a5c928

updated the top_labels

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -104,7 +104,9 @@ st.write("Enter some text, and the model will classify it.")
104
  text_input = st.text_input("Text Input")
105
  if st.button("Classify"):
106
  predictions = classify(text_input)
 
107
  for prediction in predictions:
108
  # st.write(f"Segment Text: {prediction['segment_text']}")
109
- st.write(f"Label: {prediction['top_labels']}")
 
110
  st.write(f"Probability: {prediction['top_probabilities']}")
 
104
  text_input = st.text_input("Text Input")
105
  if st.button("Classify"):
106
  predictions = classify(text_input)
107
+ labels_str=",".join(predictions["top_labels"])
108
  for prediction in predictions:
109
  # st.write(f"Segment Text: {prediction['segment_text']}")
110
+
111
+ st.write(f"Label: {labels_str}")
112
  st.write(f"Probability: {prediction['top_probabilities']}")