add padding and truncation arguments to `pipe` example
#1
by
kdutia
- opened
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 |
```
|