Commit
·
8ed0d96
1
Parent(s):
a9f3c1a
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,50 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# UnBIAS Classification Model Card
|
2 |
+
|
3 |
+
## Model Description
|
4 |
+
|
5 |
+
**UnBIAS** is a state-of-the-art model designed to classify texts based on their bias levels. The model categorizes texts into three classes: "Highly Biased", "Slightly Biased", and "Neutral".
|
6 |
+
|
7 |
+
## Model Architecture
|
8 |
+
|
9 |
+
The model is built upon the `bert-base-uncased` architecture and has been fine-tuned on a custom dataset for the specific task of bias detection.
|
10 |
+
|
11 |
+
## Dataset
|
12 |
+
|
13 |
+
The model was trained on a dataset containing news articles from various sources, annotated with one of the three bias levels. The dataset contains:
|
14 |
+
- **Highly Biased**: 4000 articles
|
15 |
+
- **Slightly Biased**: 4000 articles
|
16 |
+
- **Neutral**: 4000 articles
|
17 |
+
|
18 |
+
(Replace `XXXX` with actual counts, if available.)
|
19 |
+
|
20 |
+
## Training Procedure
|
21 |
+
|
22 |
+
The model was trained with a learning rate of `X.Xe-X`, using the Adam optimizer for `XX` epochs. We used a batch size of `XX` and a train-validation split of `XX%-XX%`.
|
23 |
+
|
24 |
+
(Replace placeholders with the actual values used during training.)
|
25 |
+
|
26 |
+
## Performance
|
27 |
+
|
28 |
+
On our validation set, the model achieved:
|
29 |
+
- **Accuracy**: 95%
|
30 |
+
- **F1 Score (Highly Biased)**: 78%
|
31 |
+
- **F1 Score (Slightly Biased)**: 75%
|
32 |
+
- **F1 Score (Neutral)**: 72%
|
33 |
+
|
34 |
+
(Replace placeholders with actual performance metrics.)
|
35 |
+
|
36 |
+
## How to Use
|
37 |
+
|
38 |
+
To use this model for text classification, use the following code:
|
39 |
+
|
40 |
+
```python
|
41 |
+
from transformers import pipeline
|
42 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
43 |
+
|
44 |
+
tokenizer = AutoTokenizer.from_pretrained("newsmediabias/UnBIAS-classifier")
|
45 |
+
model = AutoModelForSequenceClassification.from_pretrained("newsmediabias/UnBIAS-classifier")
|
46 |
+
|
47 |
+
classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
|
48 |
+
result = classifier("Women are bad driver.")
|
49 |
+
print(result)
|
50 |
+
```
|