a1noack commited on
Commit
4a4f30b
·
1 Parent(s): 52d0c34

update generation example

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -16,8 +16,8 @@ tokenizer = AutoTokenizer.from_pretrained("a1noack/bart-large-gigaword")
16
  - To achieve these results, generate text using the code below. `text_list` is a list of input text string.
17
  ```
18
  input_ids_list = tokenizer(text_list, truncation=True, max_length=128,
19
- return_tensors='pt', padding=True)['input_ids']
20
  output_ids_list = model.generate(input_ids_list, min_length=0)
21
  outputs_list = tokenizer.batch_decode(output_ids_list, skip_special_tokens=True,
22
- clean_up_tokenization_spaces=False)
23
  ```
 
16
  - To achieve these results, generate text using the code below. `text_list` is a list of input text string.
17
  ```
18
  input_ids_list = tokenizer(text_list, truncation=True, max_length=128,
19
+ return_tensors='pt', padding=True)['input_ids']
20
  output_ids_list = model.generate(input_ids_list, min_length=0)
21
  outputs_list = tokenizer.batch_decode(output_ids_list, skip_special_tokens=True,
22
+ clean_up_tokenization_spaces=False)
23
  ```