Spaces:
Runtime error
Runtime error
snaramirez872
commited on
Commit
•
24e04ee
1
Parent(s):
0c3f2c4
Update app.py
Browse files
app.py
CHANGED
@@ -131,7 +131,7 @@ def predict(tweets):
|
|
131 |
probs = torch.softmax(outs[0], dim=-1)
|
132 |
preds = torch.argmax(probs, dim=-1)
|
133 |
for i in range(len(tweets)):
|
134 |
-
res.append({'TWEETS': tweets, 'LABEL': preds[i].item(), 'PROBABILITY': probs[i][preds[i]].item()})
|
135 |
return res
|
136 |
|
137 |
res = predict(testing_loader)
|
|
|
131 |
probs = torch.softmax(outs[0], dim=-1)
|
132 |
preds = torch.argmax(probs, dim=-1)
|
133 |
for i in range(len(tweets)):
|
134 |
+
res.append({'TWEETS': tweets, 'LABEL': preds[i].item(), 'PROBABILITY': probs[i][preds[i].item()].item()})
|
135 |
return res
|
136 |
|
137 |
res = predict(testing_loader)
|