shashankheg commited on
Commit
4652c11
·
verified ·
1 Parent(s): bade6fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -5,7 +5,9 @@ from transformers import pipeline
5
  sentiment = pipeline("sentiment-analysis")
6
 
7
  def get_sentiment(input_text):
8
- return sentiment(input_text)
 
 
9
  interface = gr.Interface(fn =get_sentiment,
10
  inputs = 'text',
11
  outputs = ['text'],
 
5
  sentiment = pipeline("sentiment-analysis")
6
 
7
  def get_sentiment(input_text):
8
+ result=sentiment(input_text)
9
+ for d in result:
10
+ return d['label']
11
  interface = gr.Interface(fn =get_sentiment,
12
  inputs = 'text',
13
  outputs = ['text'],