Unverified Commit 70851a6b authored by Patrick von Platen's avatar Patrick von Platen Committed by GitHub
Browse files

[Bart] correct doc test (#16722)

parent 69233cf0
...@@ -563,7 +563,7 @@ BART_GENERATION_EXAMPLE = r""" ...@@ -563,7 +563,7 @@ BART_GENERATION_EXAMPLE = r"""
>>> inputs = tokenizer([ARTICLE_TO_SUMMARIZE], max_length=1024, return_tensors="pt") >>> inputs = tokenizer([ARTICLE_TO_SUMMARIZE], max_length=1024, return_tensors="pt")
>>> # Generate Summary >>> # Generate Summary
>>> summary_ids = model.generate(inputs["input_ids"], num_beams=2, max_length=20) >>> summary_ids = model.generate(inputs["input_ids"], num_beams=2, min_length=0, max_length=20)
>>> tokenizer.batch_decode(summary_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0] >>> tokenizer.batch_decode(summary_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
'PG&E scheduled the blackouts in response to forecasts for high winds amid dry conditions' 'PG&E scheduled the blackouts in response to forecasts for high winds amid dry conditions'
``` ```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment