Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,46 @@
|
|
1 |
---
|
2 |
license: mit
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
---
|
4 |
+
|
5 |
+
# PoliticalBiasBERT
|
6 |
+
|
7 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
8 |
+
|
9 |
+
BERT finetuned on many examples of politically biased texts
|
10 |
+
## Usage
|
11 |
+
```py
|
12 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
13 |
+
import torch
|
14 |
+
|
15 |
+
text = "your text here"
|
16 |
+
|
17 |
+
inputs = tokenizer(text, return_tensors="pt")
|
18 |
+
outputs = model(**inputs, labels=labels)
|
19 |
+
loss, logits = outputs[:2]
|
20 |
+
|
21 |
+
# [0] -> left
|
22 |
+
# [1] -> center
|
23 |
+
# [2] -> right
|
24 |
+
print(logits)
|
25 |
+
|
26 |
+
```
|
27 |
+
## References
|
28 |
+
```
|
29 |
+
@inproceedings{baly2020we,
|
30 |
+
author = {Baly, Ramy and Da San Martino, Giovanni and Glass, James and Nakov, Preslav},
|
31 |
+
title = {We Can Detect Your Bias: Predicting the Political Ideology of News Articles},
|
32 |
+
booktitle = {Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)},
|
33 |
+
series = {EMNLP~'20},
|
34 |
+
NOmonth = {November},
|
35 |
+
year = {2020}
|
36 |
+
pages = {4982--4991},
|
37 |
+
NOpublisher = {Association for Computational Linguistics}
|
38 |
+
}
|
39 |
+
|
40 |
+
@article{bucket_bias2023,
|
41 |
+
organization={Bucket Research}
|
42 |
+
title={Political Bias Classification using finetuned BERT model}
|
43 |
+
year={2023}
|
44 |
+
|
45 |
+
}
|
46 |
+
```
|