Spaces:
Runtime error
Runtime error
Matt C
commited on
Commit
·
42059b3
1
Parent(s):
95f9ac7
tweak
Browse files
app.py
CHANGED
@@ -20,8 +20,8 @@ result = model(batch)
|
|
20 |
# first indice is neutral, second is toxic
|
21 |
prediction = nn.functional.softmax(result.logits, dim=-1)
|
22 |
|
23 |
-
neutralProb =
|
24 |
-
toxicProb =
|
25 |
|
26 |
neutralProb
|
27 |
toxicProb
|
|
|
20 |
# first indice is neutral, second is toxic
|
21 |
prediction = nn.functional.softmax(result.logits, dim=-1)
|
22 |
|
23 |
+
neutralProb = prediction.data[0][0].double()
|
24 |
+
toxicProb = prediction.data[0][1].double()
|
25 |
|
26 |
neutralProb
|
27 |
toxicProb
|