Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,19 @@
|
|
1 |
-
import streamlit as st
|
2 |
-
from transformers import pipeline
|
3 |
|
4 |
-
|
5 |
|
6 |
-
|
7 |
-
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# import streamlit as st
|
2 |
+
# from transformers import pipeline
|
3 |
|
4 |
+
import gradio as gr
|
5 |
|
6 |
+
def image_classifier(inp):
|
7 |
+
return {'cat': 0.3, 'dog': 0.7}
|
8 |
|
9 |
+
demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label")
|
10 |
+
demo.launch()
|
11 |
+
|
12 |
+
# st.title("Определятор токсичности!")
|
13 |
+
|
14 |
+
# pipe = pipeline(task='text-classification', model='s-nlp/russian_toxicity_classifier')
|
15 |
+
# text = st.text_area('введите любой текст')
|
16 |
+
|
17 |
+
# if text:
|
18 |
+
# out = pipe(text)
|
19 |
+
# st.json(out)
|