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

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -1
README.md CHANGED
@@ -1,9 +1,17 @@
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
 
 
1
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
2
+
3
  tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
4
+
5
  model = AutoModelForSequenceClassification.from_pretrained('techthiyanes/Bert_Bahasa_Sentiment')
6
+
7
  inputs = tokenizer("saya tidak", return_tensors="pt")
8
+
9
  labels = torch.tensor([1]).unsqueeze(0)
10
+
11
  outputs = model(**inputs, labels=labels)
12
+
13
  loss = outputs.loss
14
+
15
  logits = outputs.logits
16
+
17
+ outputs