Cricles commited on
Commit
aa52a69
·
verified ·
1 Parent(s): 69bcac1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -56,9 +56,7 @@ st.write("""<p style='text-align: center; font-size: 24px;'>Это прилож
56
 
57
  def highlight_obscene_words(text):
58
  label,probs=model.predict(text)
59
- st.write(f"{label}")
60
- st.write(f"{probs}")
61
- if label=='__label__positive':
62
  return (text + " ", "приемлемо", "#47916B")
63
  else:
64
  return (text + " ", "токсично", "#ffcccc")
 
56
 
57
  def highlight_obscene_words(text):
58
  label,probs=model.predict(text)
59
+ if label[0]=='__label__positive':
 
 
60
  return (text + " ", "приемлемо", "#47916B")
61
  else:
62
  return (text + " ", "токсично", "#ffcccc")