nebiyu29 commited on
Commit
12a9624
1 Parent(s): 2ce118b

change the data type of top_labels

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -98,7 +98,7 @@ def classify(text):
98
  return results
99
 
100
  # Streamlit app
101
- st.title("Text Classification Demo")
102
  st.write("Enter some text, and the model will classify it.")
103
 
104
  text_input = st.text_input("Text Input")
@@ -106,5 +106,5 @@ 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']}")
 
98
  return results
99
 
100
  # Streamlit app
101
+ st.title("Text Classification.")
102
  st.write("Enter some text, and the model will classify it.")
103
 
104
  text_input = st.text_input("Text Input")
 
106
  predictions = classify(text_input)
107
  for prediction in predictions:
108
  # st.write(f"Segment Text: {prediction['segment_text']}")
109
+ st.write(f"Label: {list(prediction['top_labels'])}")
110
  st.write(f"Probability: {prediction['top_probabilities']}")