Update app.py
Browse files
app.py
CHANGED
@@ -56,10 +56,10 @@ st.write("""<p style='text-align: center; font-size: 24px;'>Это прилож
|
|
56 |
|
57 |
def highlight_obscene_words(text):
|
58 |
label,_=model.predict(text)
|
59 |
-
if label=='
|
60 |
-
return (text + " ", "токсично", "#ffcccc")
|
61 |
-
else:
|
62 |
return (text + " ", "приемлемо", "#47916B")
|
|
|
|
|
63 |
|
64 |
# Боковая панель
|
65 |
with st.sidebar:
|
|
|
56 |
|
57 |
def highlight_obscene_words(text):
|
58 |
label,_=model.predict(text)
|
59 |
+
if label=='__label__positive':
|
|
|
|
|
60 |
return (text + " ", "приемлемо", "#47916B")
|
61 |
+
else:
|
62 |
+
return (text + " ", "токсично", "#ffcccc")
|
63 |
|
64 |
# Боковая панель
|
65 |
with st.sidebar:
|