Spaces:
Sleeping
Sleeping
came back to the before the converiosn of data frame
Browse files
app.py
CHANGED
|
@@ -110,11 +110,11 @@ predictions = classify(text_input)
|
|
| 110 |
labels_str=",".join(predictions["top_labels"])
|
| 111 |
probs_ints=",".join(map(str,predictions["top_probabilities"]))
|
| 112 |
|
| 113 |
-
df=pd.DataFrame({'probabilities: ',probs_ints})
|
| 114 |
-
formated_df=df.styled.format("{:.2f}").to_dict('list')
|
| 115 |
|
| 116 |
#for prediction in predictions:
|
| 117 |
# st.write(f"Segment Text: {prediction['segment_text']}")
|
| 118 |
|
| 119 |
st.write(f"Label: {labels_str}")
|
| 120 |
-
st.write(f"Probability: {
|
|
|
|
| 110 |
labels_str=",".join(predictions["top_labels"])
|
| 111 |
probs_ints=",".join(map(str,predictions["top_probabilities"]))
|
| 112 |
|
| 113 |
+
#df=pd.DataFrame({'probabilities: ',probs_ints})
|
| 114 |
+
#formated_df=df.styled.format("{:.2f}").to_dict('list')
|
| 115 |
|
| 116 |
#for prediction in predictions:
|
| 117 |
# st.write(f"Segment Text: {prediction['segment_text']}")
|
| 118 |
|
| 119 |
st.write(f"Label: {labels_str}")
|
| 120 |
+
st.write(f"Probability: {probs_ints}")
|