Margaret commited on
Commit
659269d
1 Parent(s): fac6a5f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,8 +3,8 @@ from transformers import pipeline
3
 
4
  pipe = pipeline("sentiment-analysis", model="cardiffnlp/twitter-roberta-base-sentiment-latest")
5
 
6
- def get_sentiment(text):
7
- return pipe(text)[0]["label"]
8
 
9
  iface = gr.Interface(fn = get_sentiment,
10
  inputs = "text",
 
3
 
4
  pipe = pipeline("sentiment-analysis", model="cardiffnlp/twitter-roberta-base-sentiment-latest")
5
 
6
+ def get_sentiment(user_text):
7
+ return pipe(user_text)[0]["label"]
8
 
9
  iface = gr.Interface(fn = get_sentiment,
10
  inputs = "text",