Downloads · 30 days
20
5% of all-time downloads
Social-Media-Fairness/Tahniat-Classifier
Tahniat-Classifier is a text classification model from Social-Media-Fairness. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as openrail.
Classifier-Bias-TahniatKhan is a prototype model crafted to classify content into two categories: "Biased" and "Non-Biased". The model is built upon the distilbert-base-uncased architecture and has been fine-tuned on…
Downloads · 30 days
20
5% of all-time downloads
All-time downloads
373
Public
Repo size
536 MB
Likes
1
Public
Click a slice to open those files.
.bin268 MB · 100%
From the Hugging Face model README
Classifier-Bias-TahniatKhan is a prototype model crafted to classify content into two categories: "Biased" and "Non-Biased".
The model is built upon the distilbert-base-uncased architecture and has been fine-tuned on a custom dataset for the specific task of bias detection.
The model was trained on a BABE dataset containing news articles from various sources, annotated with one of the 2 bias levels. Biased_Text = 1810 UnBiased_Test=1810
The model was trained using the Adam optimizer for 6 epochs. Performance On our validation set, the model achieved: Accuracy: 78% F1 Score (Biased): 79% F1 Score (Non-Biased): 78%
To use this model for text classification, use the following code
from transformers import pipeline
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("/Social-Media-Fairness/Tahniat-Classifier")
model = AutoModelForSequenceClassification.from_pretrained("Social-Media-Fairness/Tahniat-Classifier")
classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
result = classifier("you are stupid")
print(result)
The model's training data originates from a specific dataset (BABE) which might not represent all kinds of biases or content. The performance metrics are based on a random validation split, so the model's performance might vary in real-world applications.
Developed by Tahniat Khan