Reaper200 commited on
Commit
0eac9c7
·
verified ·
1 Parent(s): 4aad6df

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ model = pipeline('sentiment-analysis')
5
+
6
+ def label(tweet):
7
+ return model(tweet)
8
+
9
+
10
+
11
+ iface = gr.Interface(fn=label,
12
+ inputs="text",
13
+ outputs=["text"])
14
+ iface.launch()