Update README.md
Browse files
README.md
CHANGED
@@ -91,7 +91,7 @@ def predict(text, model, tokenizer):
|
|
91 |
return predictions
|
92 |
|
93 |
# Example usage
|
94 |
-
new_text = "
|
95 |
predictions = predict(new_text, model, tokenizer)
|
96 |
|
97 |
# Define the categories
|
@@ -113,6 +113,34 @@ output = {
|
|
113 |
print(json.dumps(output, indent=4, ensure_ascii=False))
|
114 |
```
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
## Notes
|
117 |
|
118 |
- This model is currently configured to work only with English text.
|
|
|
91 |
return predictions
|
92 |
|
93 |
# Example usage
|
94 |
+
new_text = "Fuck off stuped trash"
|
95 |
predictions = predict(new_text, model, tokenizer)
|
96 |
|
97 |
# Define the categories
|
|
|
113 |
print(json.dumps(output, indent=4, ensure_ascii=False))
|
114 |
```
|
115 |
|
116 |
+
Output:
|
117 |
+
|
118 |
+
```json
|
119 |
+
{
|
120 |
+
"text": "Fuck off stuped trash",
|
121 |
+
"category_scores": {
|
122 |
+
"harassment": 0.9272650480270386,
|
123 |
+
"harassment_threatening": 0.0013139015063643456,
|
124 |
+
"hate": 0.011709265410900116,
|
125 |
+
"hate_threatening": 1.1083522622357123e-05,
|
126 |
+
"self_harm": 0.00039102151640690863,
|
127 |
+
"self_harm_instructions": 0.0002464024000801146,
|
128 |
+
"self_harm_intent": 0.00031603744719177485,
|
129 |
+
"sexual": 0.020730027928948402,
|
130 |
+
"sexual_minors": 0.00018848323088604957,
|
131 |
+
"violence": 0.008375612087547779,
|
132 |
+
"violence_graphic": 2.8763401132891886e-05,
|
133 |
+
"self-harm": 0.00043840022408403456,
|
134 |
+
"sexual/minors": 0.00018241720681544393,
|
135 |
+
"hate/threatening": 1.1130881830467843e-05,
|
136 |
+
"violence/graphic": 2.7211604901822284e-05,
|
137 |
+
"self-harm/intent": 0.00026327319210395217,
|
138 |
+
"self-harm/instructions": 0.00023905260604806244,
|
139 |
+
"harassment/threatening": 0.0012845908058807254
|
140 |
+
}
|
141 |
+
}
|
142 |
+
```
|
143 |
+
|
144 |
## Notes
|
145 |
|
146 |
- This model is currently configured to work only with English text.
|