Commit
·
1d05590
1
Parent(s):
3190874
Update README.md
Browse files
README.md
CHANGED
@@ -34,7 +34,7 @@ hypothesis = "The movie was good."
|
|
34 |
input = tokenizer(premise, hypothesis, truncation=True, return_tensors="pt")
|
35 |
output = model(input["input_ids"].to(device)) # device = "cuda:0" or "cpu"
|
36 |
prediction = torch.softmax(output["logits"][0], -1).tolist()
|
37 |
-
label_names = ["entailment", "
|
38 |
prediction = {name: round(float(pred) * 100, 1) for pred, name in zip(prediction, label_names)}
|
39 |
print(prediction)
|
40 |
```
|
|
|
34 |
input = tokenizer(premise, hypothesis, truncation=True, return_tensors="pt")
|
35 |
output = model(input["input_ids"].to(device)) # device = "cuda:0" or "cpu"
|
36 |
prediction = torch.softmax(output["logits"][0], -1).tolist()
|
37 |
+
label_names = ["entailment", "not_entailment"]
|
38 |
prediction = {name: round(float(pred) * 100, 1) for pred, name in zip(prediction, label_names)}
|
39 |
print(prediction)
|
40 |
```
|