continuation from the given context. The following example shows how GPT-2 can be used in pipelines to generate text.
As a default all models apply Top-K sampling when used in pipelines, as configured in their respective configurations
(see gpt-2 config for example).
```py
from transformers import pipeline
text_generator = pipeline("text-generation")
print(text_generator("As far as I am concerned, I will", max_length=50, do_sample=False))
[{'generated_text': 'As far as I am concerned, I will be the first to admit that I am not a fan of the idea of a
"free market." I think that the idea of a free market is a bit of a stretch. I think that the idea'}]
```
Here, the model generates a random text with a total maximal length of 50 tokens from context "As far as I am
concerned, I will". Behind the scenes, the pipeline object calls the method
