Update app.py
Browse files
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 |
-
|
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")
|