Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -46,9 +46,8 @@ result
|
|
46 |
# transform logit to get probabilities
|
47 |
if (result.logits.size(dim=1) < 2):
|
48 |
pad = (0, 1)
|
49 |
-
result = nn.functional.pad(result.logits, pad, "constant", 0)
|
50 |
st.write(result)
|
51 |
-
prediction = nn.functional.softmax(result, dim=-1)
|
52 |
prediction = nn.functional.softmax(result.logits, dim=-1)
|
53 |
prediction
|
54 |
#neutralProb = prediction.data[0][neutralIndex]
|
|
|
46 |
# transform logit to get probabilities
|
47 |
if (result.logits.size(dim=1) < 2):
|
48 |
pad = (0, 1)
|
49 |
+
result.logits = nn.functional.pad(result.logits, pad, "constant", 0)
|
50 |
st.write(result)
|
|
|
51 |
prediction = nn.functional.softmax(result.logits, dim=-1)
|
52 |
prediction
|
53 |
#neutralProb = prediction.data[0][neutralIndex]
|