Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
"
|
| 61 |
unsafe_allow_html=True
|
| 62 |
)
|
| 63 |
else:
|
| 64 |
st.markdown(
|
| 65 |
-
"
|
| 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 |
|