Spaces:
Sleeping
Sleeping
it was looping so i commeted it
Browse files
app.py
CHANGED
|
@@ -102,12 +102,12 @@ 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")
|
| 105 |
-
if st.button("Classify"):
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
for prediction in predictions:
|
| 110 |
# st.write(f"Segment Text: {prediction['segment_text']}")
|
| 111 |
|
| 112 |
-
|
| 113 |
-
|
|
|
|
| 102 |
st.write("Enter some text, and the model will classify it.")
|
| 103 |
|
| 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 |
+
probs_ints=",".join(map(str,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}")
|