Spaces:
Runtime error
Runtime error
Matt C
commited on
Commit
•
37e34d5
1
Parent(s):
3fea615
tweak
Browse files
app.py
CHANGED
@@ -23,9 +23,9 @@ prediction = nn.functional.softmax(result.logits, dim=-1)
|
|
23 |
neutralProb = prediction.data[0][0]
|
24 |
toxicProb = prediction.data[0][1]
|
25 |
|
26 |
-
neutralProb = torch.round(neutralProb, decimals=
|
27 |
-
toxicProb = torch.round(toxicProb, decimals=
|
28 |
|
29 |
st.write("Classification Probabilities")
|
30 |
-
st.write(f"Neutral: {neutralProb}")
|
31 |
-
st.write(f"Toxic: {toxicProb}")
|
|
|
23 |
neutralProb = prediction.data[0][0]
|
24 |
toxicProb = prediction.data[0][1]
|
25 |
|
26 |
+
neutralProb = torch.round(neutralProb, decimals=4)
|
27 |
+
toxicProb = torch.round(toxicProb, decimals=4)
|
28 |
|
29 |
st.write("Classification Probabilities")
|
30 |
+
st.write(f"Neutral: {neutralProb:.4}")
|
31 |
+
st.write(f"Toxic: {toxicProb:.4}")
|