Text Classification
Transformers
PyTorch
English
roberta
climate
mpjuhasz commited on
Commit
c920e28
·
verified ·
1 Parent(s): f8caf87

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -2
README.md CHANGED
@@ -45,9 +45,11 @@ tokenizer = AutoTokenizer.from_pretrained(model_name)
45
  pipe = pipeline("text-classification", model=model, tokenizer=tokenizer, function_to_apply="sigmoid")
46
 
47
 
48
- pipe(example, padding=True, truncation=True)
49
 
50
- >>> [{'label': 'NZT', 'score': 0.9142044186592102}]
 
 
51
  ```
52
 
53
 
 
45
  pipe = pipeline("text-classification", model=model, tokenizer=tokenizer, function_to_apply="sigmoid")
46
 
47
 
48
+ pipe(example, padding=True, truncation=True, return_all_scores=True)
49
 
50
+ >>> [[{'label': 'NZT', 'score': 0.9142044186592102},
51
+ {'label': 'Reduction', 'score': 0.04552844911813736},
52
+ {'label': 'Other', 'score': 0.07590094953775406}]]
53
  ```
54
 
55