Spaces:
Sleeping
Sleeping
Update pages/toxic.py
Browse files- pages/toxic.py +1 -1
pages/toxic.py
CHANGED
@@ -9,7 +9,7 @@ def query(payload):
|
|
9 |
return response.json()
|
10 |
text = st.text_input("Введите комментарий")
|
11 |
if text:
|
12 |
-
output = query(text)[0]
|
13 |
if output == 'dangerous':
|
14 |
st.markdown('<p style="color:red;">ОПАСНЫЙ КОММЕНТАРИЙ</p>', unsafe_allow_html=True)
|
15 |
elif output == 'non-toxic':
|
|
|
9 |
return response.json()
|
10 |
text = st.text_input("Введите комментарий")
|
11 |
if text:
|
12 |
+
output = query(text)[0].get('label')
|
13 |
if output == 'dangerous':
|
14 |
st.markdown('<p style="color:red;">ОПАСНЫЙ КОММЕНТАРИЙ</p>', unsafe_allow_html=True)
|
15 |
elif output == 'non-toxic':
|