techthiyanes commited on
Commit
af2d1b0
·
1 Parent(s): 4541b64

Update README.md

Browse files

0 negative
1 neutral
2 positive

Files changed (1) hide show
  1. README.md +9 -1
README.md CHANGED
@@ -1 +1,9 @@
1
- hello
 
 
 
 
 
 
 
 
 
1
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
2
+ tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
3
+ model = AutoModelForSequenceClassification.from_pretrained('techthiyanes/Bert_Bahasa_Sentiment')
4
+ inputs = tokenizer("saya tidak", return_tensors="pt")
5
+ labels = torch.tensor([1]).unsqueeze(0)
6
+ outputs = model(**inputs, labels=labels)
7
+ loss = outputs.loss
8
+ logits = outputs.logits
9
+ outputs