Cricles commited on
Commit
8fba3f9
·
1 Parent(s): c71fa94

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -57,12 +57,12 @@ def highlight_obscene_words(text):
57
  label,_=model.predict(text.lower())
58
  if label[0]=='__label__positive':
59
  st.markdown(
60
- """<span style='background:#47916B;'>|приемлемо</span>""",
61
  unsafe_allow_html=True
62
  )
63
  else:
64
  st.markdown(
65
- """<span style='background:#ffcccc;'>|токсично</span>""",
66
  unsafe_allow_html=True
67
  )
68
 
 
57
  label,_=model.predict(text.lower())
58
  if label[0]=='__label__positive':
59
  st.markdown(
60
+ "<span style='background:#47916B;'>{}|приемлемо</span>".format(text),
61
  unsafe_allow_html=True
62
  )
63
  else:
64
  st.markdown(
65
+ "<span style='background:#ffcccc;'>{}|токсично</span>".format(text),
66
  unsafe_allow_html=True
67
  )
68