nebiyu29 commited on
Commit
49baf1f
1 Parent(s): 25c2f1c

changes the format of the top probabilies so that it can much with streamlit

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -105,8 +105,9 @@ 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']}")
 
105
  if st.button("Classify"):
106
  predictions = classify(text_input)
107
  labels_str=",".join(predictions["top_labels"])
108
+ probs_ints=",".join(predictions["top_probabilities"])
109
  for prediction in predictions:
110
  # st.write(f"Segment Text: {prediction['segment_text']}")
111
 
112
  st.write(f"Label: {labels_str}")
113
+ st.write(f"Probability: {probs_ints}")