Text Classification
Transformers
PyTorch
English
roberta
climate
Inference Endpoints

add padding and truncation arguments to `pipe` example

#1
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -45,7 +45,7 @@ tokenizer = AutoTokenizer.from_pretrained(model_name)
45
  pipe = pipeline("text-classification", model=model, tokenizer=tokenizer, function_to_apply="sigmoid")
46
 
47
 
48
- pipe(example)
49
 
50
  >>> [{'label': 'NZT', 'score': 0.9142044186592102}]
51
  ```
 
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
  ```