Spaces:
Runtime error
Runtime error
testing
Browse files
app.py
CHANGED
@@ -43,12 +43,13 @@ result = model(encoding)
|
|
43 |
|
44 |
# transform logit to get probabilities
|
45 |
prediction = nn.functional.softmax(result.logits, dim=-1)
|
46 |
-
|
47 |
-
|
|
|
48 |
|
49 |
# Expected returns from RoBERTa on default text:
|
50 |
# Neutral: 0.0052
|
51 |
# Toxic: 0.9948
|
52 |
st.write("Classification Probabilities")
|
53 |
-
st.write(f"{neutralProb:.4f} - NEUTRAL")
|
54 |
-
st.write(f"{toxicProb:.4f} - TOXIC")
|
|
|
43 |
|
44 |
# transform logit to get probabilities
|
45 |
prediction = nn.functional.softmax(result.logits, dim=-1)
|
46 |
+
prediction
|
47 |
+
#neutralProb = prediction.data[0][neutralIndex]
|
48 |
+
#toxicProb = prediction.data[0][toxicIndex]
|
49 |
|
50 |
# Expected returns from RoBERTa on default text:
|
51 |
# Neutral: 0.0052
|
52 |
# Toxic: 0.9948
|
53 |
st.write("Classification Probabilities")
|
54 |
+
#st.write(f"{neutralProb:.4f} - NEUTRAL")
|
55 |
+
#st.write(f"{toxicProb:.4f} - TOXIC")
|