Downloads · 30 days
10
33% of all-time downloads
pajola/hate-speech-detection-lr-tfidf
hate-speech-detection-lr-tfidf is a machine learning model from pajola. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This is a hate speech detection model trained on social media text data. The model classifies text into three categories: - Hate Speech: Content that attacks or uses pejorative language against a person or group - Off…
Downloads · 30 days
10
33% of all-time downloads
All-time downloads
30
Public
Repo size
3.8 MB
Likes
0
Public
Click a slice to open those files.
.pkl3.8 MB · 100%
From the Hugging Face model README
This is a hate speech detection model trained on social media text data. The model classifies text into three categories:
from inference import HateSpeechDetector
# Initialize the detector
detector = HateSpeechDetector()
# Make a prediction
text = "Your text here"
result = detector.predict(text)
print(f"Predicted class: {result['predicted_class']}")
print(f"Probabilities: {result['probabilities']}")
model.pkl: The trained scikit-learn pipelineconfig.json: Model configuration and metadatapreprocessing.py: Text preprocessing functionsinference.py: Inference class for making predictionsREADME.md: This documentationThe model was trained on labeled social media data containing tweets labeled for hate speech detection.
The following preprocessing steps are applied:
This model is intended for research and educational purposes. When using for content moderation:
If you use this model, please cite appropriately and consider the ethical implications of automated hate speech detection.