rezyek06 commited on
Commit
0e06909
·
verified ·
1 Parent(s): a29c796

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+ import gradio as gr
3
+
4
+ model = pipeline(model="seara/rubert-tiny2-ru-go-emotions")
5
+
6
+ def text_classification(data):
7
+ result = model(data)[0]['label']
8
+ return result
9
+
10
+ demo = gr.Interface(fn=text_classification, inputs="textbox", outputs="textbox")
11
+
12
+ demo.launch(share=True)