ggureung commited on
Commit
a3f2757
·
verified ·
1 Parent(s): e92b246

Update app.py

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