Spaces:
Runtime error
Runtime error
Matt C
commited on
Commit
·
2ce83a2
1
Parent(s):
06c8e14
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 |
print("Classification Probabilities")
|
27 |
print(f"Neutral: {neutralProb}")
|
|
|
20 |
# first indice is neutral, second is toxic
|
21 |
prediction = nn.functional.softmax(result.logits, dim=-1)
|
22 |
|
23 |
+
neutralProb = prediction.data[0]
|
24 |
+
toxicProb = prediction.data[1]
|
25 |
|
26 |
print("Classification Probabilities")
|
27 |
print(f"Neutral: {neutralProb}")
|