This is the first classification of sentiment analysis for (redacted) task ### How to use this code ```python import torch from transformers import BertForSequenceClassification, BertTokenizer, BertConfig tokenizer = BertTokenizer.from_pretrained("nfhakim/sentiment-analysis-c1") config = BertConfig.from_pretrained("nfhakim/sentiment-analysis-c1") model = BertForSequenceClassification.from_pretrained("nfhakim/sentiment-analysis-c1", config=config) text = 'INSERT TEXT - MINIMUM 3 SENTENCES FOR BETTER PREDICITONS' subwords = tokenizer.encode(text) subwords = torch.LongTensor(subwords).view(1, -1).to(model.device) i2w = {0: 'positive', 1: 'non-positive'} logits = model(subwords)[0] label = torch.topk(logits, k=1, dim=-1)[1].squeeze().item() print(f'Text: {text} | Label : {i2w[label]} ({torch.nn.functional.softmax(logits, dim=-1).squeeze()[label] * 100:.3f}%)') ```