PH83 commited on
Commit
29f9d08
·
1 Parent(s): 74d2ebb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -1,4 +1,14 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- sentiment = pipeline("sentiment-analysis")
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ sentiment = pipeline("sentiment-analysis")
5
+
6
+ def sent(input_text):
7
+ return sentiment(input_text)
8
+
9
+ iface = gr.Interface(fn = sent,
10
+ input = 'text' ,
11
+ output = ['text'],
12
+ title = 'sentiment analysis',
13
+ description = 'this is taking the sentiment of a sentence')
14
+ iface.launch()