Instructions to use KoalaAI/Text-Moderation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KoalaAI/Text-Moderation with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="KoalaAI/Text-Moderation")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("KoalaAI/Text-Moderation") model = AutoModelForSequenceClassification.from_pretrained("KoalaAI/Text-Moderation") - Inference
- Notebooks
- Google Colab
- Kaggle
Commit ·
53c0e05
1
Parent(s): 6d101ff
Update README.md
Browse files
README.md
CHANGED
|
@@ -3,13 +3,15 @@ tags:
|
|
| 3 |
- autotrain
|
| 4 |
- text-classification
|
| 5 |
language:
|
| 6 |
-
-
|
| 7 |
widget:
|
| 8 |
-
- text:
|
| 9 |
-
- text:
|
| 10 |
-
- text:
|
| 11 |
-
- text:
|
| 12 |
-
|
|
|
|
|
|
|
| 13 |
datasets:
|
| 14 |
- mmathys/openai-moderation-api-evaluation
|
| 15 |
- DarwinAnim8or/autotrain-data-text-moderation-v2-small
|
|
@@ -32,7 +34,9 @@ It is split up in the following labels:
|
|
| 32 |
| sexual/minors | `S3` | Sexual content that includes an individual who is under 18 years old. |
|
| 33 |
| hate/threatening | `H2` | Hateful content that also includes violence or serious harm towards the targeted group. |
|
| 34 |
| violence/graphic | `V2` | Violent content that depicts death, violence, or serious physical injury in extreme graphic detail. |
|
| 35 |
-
| OK |
|
|
|
|
|
|
|
| 36 |
|
| 37 |
## Ethical Considerations
|
| 38 |
This is a model that deals with sensitive and potentially harmful language. Users should consider the ethical implications and potential risks of using or deploying this model in their applications or contexts. Some of the ethical issues that may arise are:
|
|
@@ -59,7 +63,7 @@ By accessing or using this model, you agree to be bound by the terms of this lic
|
|
| 59 |
## Validation Metrics
|
| 60 |
|
| 61 |
- Loss: 0.848
|
| 62 |
-
- Accuracy: 0.749
|
| 63 |
- Macro F1: 0.326
|
| 64 |
- Micro F1: 0.749
|
| 65 |
- Weighted F1: 0.703
|
|
|
|
| 3 |
- autotrain
|
| 4 |
- text-classification
|
| 5 |
language:
|
| 6 |
+
- en
|
| 7 |
widget:
|
| 8 |
+
- text: I love AutoTrain
|
| 9 |
+
- text: I absolutely hate those people
|
| 10 |
+
- text: I love cake!
|
| 11 |
+
- text: >-
|
| 12 |
+
lets build the wall and deport illegals "they walk across the border like
|
| 13 |
+
this is Central park"
|
| 14 |
+
- text: EU offers to pay countries 6,000 euros per person to take in migrants
|
| 15 |
datasets:
|
| 16 |
- mmathys/openai-moderation-api-evaluation
|
| 17 |
- DarwinAnim8or/autotrain-data-text-moderation-v2-small
|
|
|
|
| 34 |
| sexual/minors | `S3` | Sexual content that includes an individual who is under 18 years old. |
|
| 35 |
| hate/threatening | `H2` | Hateful content that also includes violence or serious harm towards the targeted group. |
|
| 36 |
| violence/graphic | `V2` | Violent content that depicts death, violence, or serious physical injury in extreme graphic detail. |
|
| 37 |
+
| OK | `OK` | Not offensive
|
| 38 |
+
|
| 39 |
+
It's important to remember that this model was only trained on English texts, and may not perform well on non-English inputs.
|
| 40 |
|
| 41 |
## Ethical Considerations
|
| 42 |
This is a model that deals with sensitive and potentially harmful language. Users should consider the ethical implications and potential risks of using or deploying this model in their applications or contexts. Some of the ethical issues that may arise are:
|
|
|
|
| 63 |
## Validation Metrics
|
| 64 |
|
| 65 |
- Loss: 0.848
|
| 66 |
+
- Accuracy: 0.749 (75%)
|
| 67 |
- Macro F1: 0.326
|
| 68 |
- Micro F1: 0.749
|
| 69 |
- Weighted F1: 0.703
|