Update README.md
Browse files
README.md
CHANGED
@@ -19,6 +19,11 @@ import torch
|
|
19 |
|
20 |
text = "your text here"
|
21 |
|
|
|
|
|
|
|
|
|
|
|
22 |
inputs = tokenizer(text, return_tensors="pt")
|
23 |
outputs = model(**inputs, labels=labels)
|
24 |
loss, logits = outputs[:2]
|
|
|
19 |
|
20 |
text = "your text here"
|
21 |
|
22 |
+
tokenizer = AutoTokenizer.from_pretrained("bert-base-cased")
|
23 |
+
|
24 |
+
model = AutoModelForSequenceClassification.from_pretrained("bucketresearch/politicalBiasBERT")
|
25 |
+
|
26 |
+
|
27 |
inputs = tokenizer(text, return_tensors="pt")
|
28 |
outputs = model(**inputs, labels=labels)
|
29 |
loss, logits = outputs[:2]
|