Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,27 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# π§ BERT Classifier for Black Article Detection
|
2 |
+
|
3 |
+
## π Model Overview
|
4 |
+
This repository hosts a fine-tuned BERT model (`bert-base-uncased`) for classifying newspaper articles based on whether they center on Black people. The training dataset is provided for full reproducibility.
|
5 |
+
|
6 |
+
## π Description
|
7 |
+
The model was trained on 2,000 manually labeled sentences from historical newspaper articles (1960β1973). Labels indicate if the article primarily concerns Black people.
|
8 |
+
- **Inputs:** `sentence` *(string)*
|
9 |
+
- **Outputs:** `black_story` *(0 or 1)*
|
10 |
+
|
11 |
+
## π Performance Metrics
|
12 |
+
- **Training Accuracy:** 93.5%
|
13 |
+
- **Validation Accuracy:** 91.2%
|
14 |
+
- **Precision:** 90.8%
|
15 |
+
- **Recall:** 92.1%
|
16 |
+
|
17 |
+
## π Usage Instructions
|
18 |
+
To use this model via Hugging Face Transformers:
|
19 |
+
```python
|
20 |
+
from transformers import pipeline
|
21 |
+
classifier = pipeline("text-classification", model="mikemcrae/black-article-classifier")
|
22 |
+
result = classifier("Black activists led a peaceful protest downtown.")
|
23 |
+
print(result)
|
24 |
+
|
25 |
+
|
26 |
+
MIT License Β© 2025 Mike McRae
|
27 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|