alexabrahall commited on
Commit
4367cf8
1 Parent(s): 53c27af

Update app/main.py

Browse files
Files changed (1) hide show
  1. app/main.py +1 -1
app/main.py CHANGED
@@ -55,5 +55,5 @@ if st.button('Classify'):
55
  # Display the result
56
  prediction_raw_text.write("Prediction:")
57
  print(prediction)
58
- prediction_text.write(f"The text is {label_map[prediction[0]['label']]} with a confidence of {prediction[0]['score']*100}%")
59
 
 
55
  # Display the result
56
  prediction_raw_text.write("Prediction:")
57
  print(prediction)
58
+ prediction_text.markdown(f"The text is <span style='color: {'red' if prediction[0]['label'] == 'LABEL_1' else 'green'}'>{label_map[prediction[0]['label']]}</span> with a confidence of {prediction[0]['score']*100}%", unsafe_allow_html=True)
59