MoritzLaurer HF staff commited on
Commit
dcf5730
1 Parent(s): a463c68

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -31,7 +31,7 @@ hypothesis = "The movie was good."
31
  input = tokenizer(premise, hypothesis, truncation=True, return_tensors="pt")
32
  output = model(input["input_ids"].to(device)) # device = "cuda:0" or "cpu"
33
  prediction = torch.softmax(output["logits"][0], -1).tolist()
34
- label_names = ["entailment", "neutral", "contradiction"]
35
  prediction = {name: round(float(pred) * 100, 1) for pred, name in zip(prediction, label_names)}
36
  print(prediction)
37
  ```
 
31
  input = tokenizer(premise, hypothesis, truncation=True, return_tensors="pt")
32
  output = model(input["input_ids"].to(device)) # device = "cuda:0" or "cpu"
33
  prediction = torch.softmax(output["logits"][0], -1).tolist()
34
+ label_names = ["entailment", "not_entailment"]
35
  prediction = {name: round(float(pred) * 100, 1) for pred, name in zip(prediction, label_names)}
36
  print(prediction)
37
  ```