Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
|
2 |
-
|
3 |
|
4 |
-
|
5 |
|
6 |
-
|
7 |
-
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
|
4 |
+
st.title("Определятор токсичности!")
|
5 |
|
6 |
+
pipe = pipeline(task='text-classification', model='s-nlp/russian_toxicity_classifier')
|
7 |
+
text = st.text_area('введите любой текст')
|
8 |
|
9 |
+
if text:
|
10 |
+
out = pipe(text)
|
11 |
+
st.json(out)
|