cardiffnlp/tweet_eval
Viewer β’ Updated β’ 201k β’ 33k β’ 144
How to use sathwika01/hate-speech-classifier with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="sathwika01/hate-speech-classifier") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("sathwika01/hate-speech-classifier")
model = AutoModelForSequenceClassification.from_pretrained("sathwika01/hate-speech-classifier")A DistilBERT model fine-tuned for binary hate speech detection on the
TweetEval hate speech dataset.
Classifies text as hate (1) or non-hate (0).
| Split | F1 (weighted) |
|---|---|
| Validation | 0.771 |
| Test | 0.376 |
from transformers import pipeline
classifier = pipeline("text-classification",
model="sathwika01/hate-speech-classifier")
classifier("This is an example text")
Research and educational purposes β detecting hateful content in social media text.