Nooshinbr commited on
Commit
a97b35d
·
1 Parent(s): 8c61966

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ gradio as gr
2
+ from transformers import pipeline
3
+ sentiment = pipeline("sentiment-analysis")
4
+ def get_sentiment(input_text):
5
+ return sentiment(input_text)
6
+ iface = gr.Interface(fn =get_sentiment,
7
+ inputs = 'text',
8
+ outputs = ['text'],
9
+ title = 'Sentiment Analysis',
10
+ description = 'Get Sentiment Negative/positive for the given input')
11
+ iface.launch(inline = False)