mikemcrae25 commited on
Commit
74d9649
Β·
verified Β·
1 Parent(s): b327a3d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +31 -4
README.md CHANGED
@@ -1,10 +1,11 @@
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
 
@@ -15,13 +16,39 @@ The model was trained on 2,000 manually labeled sentences from historical newspa
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.
 
 
 
 
 
 
 
 
 
 
 
 
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 their focus on Black people. The training dataset is also provided for reproducibility.
5
 
6
  ## πŸ“– Description
7
+ - **Model:** Fine-tuned `bert-base-uncased`
8
+ - **Training Data:** 2,000 manually labeled sentences from historical newspaper articles (1960–1973)
9
  - **Inputs:** `sentence` *(string)*
10
  - **Outputs:** `black_story` *(0 or 1)*
11
 
 
16
  - **Recall:** 92.1%
17
 
18
  ## πŸš€ Usage Instructions
 
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
+ ## πŸ’Ύ Training Dataset
27
+ - Hugging Face Dataset: [mikemcrae/black-article-training-data](https://huggingface.co/datasets/mikemcrae/black-article-training-data)
28
+ - CSV Columns: `sentence`, `black_story`
29
 
30
+ ## βš™οΈ Reproduction Instructions
31
+ ```python
32
+ from datasets import load_dataset
33
+ from transformers import BertForSequenceClassification, Trainer, TrainingArguments
34
+
35
+ dataset = load_dataset("mikemcrae/black-article-training-data")
36
+ model = BertForSequenceClassification.from_pretrained("bert-base-uncased", num_labels=2)
37
+ ```
38
+
39
+ ## πŸ“œ License
40
+ **MIT License**: Free to use with attribution.
41
+ ```
42
  MIT License Β© 2025 Mike McRae
43
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
44
+ ```
45
+
46
+ ## ❀️ Citation
47
+ ```
48
+ @inproceedings{mcrae2025blackbert,
49
+ title={BERT Classifier for Black Article Detection},
50
+ author={Mike McRae},
51
+ year={2025},
52
+ url={https://huggingface.co/mikemcrae/black-article-classifier}
53
+ }
54
+ ```