Text Classification
Transformers
Safetensors
English
distilbert
toxicity
Eval Results (legacy)
text-embeddings-inference
Instructions to use YamenRM/Toxicity_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use YamenRM/Toxicity_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="YamenRM/Toxicity_model")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("YamenRM/Toxicity_model") model = AutoModelForSequenceClassification.from_pretrained("YamenRM/Toxicity_model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -83,7 +83,7 @@ Load with the Hugging Face `pipeline`:
|
|
| 83 |
```python
|
| 84 |
from transformers import pipeline
|
| 85 |
|
| 86 |
-
classifier = pipeline("text-classification", model="
|
| 87 |
|
| 88 |
print(classifier("I hate everyone, you're the worst!"))
|
| 89 |
# [{'label': 'toxic', 'score': 0.97}]
|
|
|
|
| 83 |
```python
|
| 84 |
from transformers import pipeline
|
| 85 |
|
| 86 |
+
classifier = pipeline("text-classification", model="YamenRM/distilbert-toxic-comments")
|
| 87 |
|
| 88 |
print(classifier("I hate everyone, you're the worst!"))
|
| 89 |
# [{'label': 'toxic', 'score': 0.97}]
|