Instructions to use sisyphus199/ukparliamentBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sisyphus199/ukparliamentBERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="sisyphus199/ukparliamentBERT")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("sisyphus199/ukparliamentBERT") model = AutoModelForSequenceClassification.from_pretrained("sisyphus199/ukparliamentBERT") - Notebooks
- Google Colab
- Kaggle
Model Card for Model ID
Fine-tuned BERT trained to identify political party from speech in the UK Parliament. Trained with Labour/Conservative speeches using the hansard dataset 2000-2020
Model Details
- License: MIT
- Finetuned from model : BERT
Model Sources
- Repository: Available on Github
Uses
Model can be used to predict whether an item of speech from the UK Parliament was said by a member of the Labour or Conservative Party.
Out-of-Scope Use
Model has only been exposed to UK data and speeches from Labour or Conservative. May not work as intended for other parties or geographies.
Training Data
Preprocessing
[bert-cased]
Evaluation
Evaluated on held-out test data. Achieved test accuracy >80% and test loss <0.4 (binary cross-entropy).
Citation
BibTeX:
@misc{baly2020detect, title={We Can Detect Your Bias: Predicting the Political Ideology of News Articles}, author={Ramy Baly and Giovanni Da San Martino and James Glass and Preslav Nakov}, year={2020}, eprint={2010.05338}, archivePrefix={arXiv}, primaryClass={cs.CL} }
- Downloads last month
- 3