Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: openrail
|
3 |
+
library_name: transformers
|
4 |
+
---
|
5 |
+
# Model Details
|
6 |
+
Classifier-Bias-TahniatKhan is a prototype model crafted to classify content into two categories: "Biased" and "Non-Biased".
|
7 |
+
# Model Architecture
|
8 |
+
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.
|
9 |
+
# Dataset
|
10 |
+
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
|
11 |
+
# Training Procedure
|
12 |
+
The model was trained using the Adam optimizer for 6 epochs.
|
13 |
+
Performance On our validation set, the model achieved:
|
14 |
+
Accuracy: 78% F1 Score (Biased): 79% F1 Score (Non-Biased): 78%
|
15 |
+
# How to Use
|
16 |
+
To use this model for text classification, use the following code
|
17 |
+
''''''
|
18 |
+
from transformers import pipeline
|
19 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
20 |
+
|
21 |
+
tokenizer = AutoTokenizer.from_pretrained("/Social-Media-Fairness/Tahniat-Classifier")
|
22 |
+
model = AutoModelForSequenceClassification.from_pretrained("Social-Media-Fairness/Tahniat-Classifier")
|
23 |
+
classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
|
24 |
+
result = classifier("you are stupid")
|
25 |
+
print(result)
|
26 |
+
# Caveats and Limitations
|
27 |
+
The model's training data originates from a specific dataset (BABE) which might not represent all kinds of biases or content.
|
28 |
+
The performance metrics are based on a random validation split, so the model's performance might vary in real-world applications.
|