Spaces:
Runtime error
Runtime error
edit
Browse files
app.py
CHANGED
@@ -6,8 +6,8 @@ import torch
|
|
6 |
def bertweet(data):
|
7 |
specific_model = pipeline(model="finiteautomata/bertweet-base-sentiment-analysis")
|
8 |
result = specific_model(data)
|
9 |
-
label = result['label']
|
10 |
-
score = result['score']
|
11 |
|
12 |
return label, score
|
13 |
|
|
|
6 |
def bertweet(data):
|
7 |
specific_model = pipeline(model="finiteautomata/bertweet-base-sentiment-analysis")
|
8 |
result = specific_model(data)
|
9 |
+
label = result[0]['label']
|
10 |
+
score = result[0]['score']
|
11 |
|
12 |
return label, score
|
13 |
|