Views
No views yet
transformers (tested on 4.31.0-py3)1from transformers import BertTokenizer, AutoTokenizer
2from transformers import BertForSequenceClassification, AdamW, BertConfig
3
4tokenizer = AutoTokenizer.from_pretrained('armansakif/bengali-fake-news')
5
6model = BertForSequenceClassification.from_pretrained(
7 "armansakif/bengali-fake-news", # Use the 12-layer BERT model, with an uncased vocab.
8 num_labels = 2, # The number of output labels--2 for binary classification.
9 # You can increase this for multi-class tasks.
10 output_attentions = False, # Whether the model returns attentions weights.
11 output_hidden_states = False, # Whether the model returns all hidden-states.
12)
13@article{chowdhury2023tackling,
title={Tackling Fake News in Bengali: Unraveling the Impact of Summarization vs. Augmentation on Pre-trained Language Models},
author={Chowdhury, Arman Sakif and Shahariar, GM and Aziz, Ahammed Tarik and Alam, Syed Mohibul and Sheikh, Md Azad and Belal, Tanveer Ahmed},
journal={arXiv preprint arXiv:2307.06979},
year={2023}
}