stefan-it commited on
Commit
419a325
1 Parent(s): 943cc3b

readme: fix max_length parameter in text generation pipeline

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -49,9 +49,9 @@ However, text generation is a bit more interesting, so here's an example that sh
49
  from transformers import pipeline
50
 
51
  pipe = pipeline('text-generation', model="dbmdz/german-gpt2",
52
- tokenizer="dbmdz/german-gpt2", config={'max_length':800})
53
 
54
- text = pipe2("Der Sinn des Lebens ist es")[0]["generated_text"]
55
 
56
  print(text)
57
  ```
 
49
  from transformers import pipeline
50
 
51
  pipe = pipeline('text-generation', model="dbmdz/german-gpt2",
52
+ tokenizer="dbmdz/german-gpt2")
53
 
54
+ text = pipe2("Der Sinn des Lebens ist es", max_length=100)[0]["generated_text"]
55
 
56
  print(text)
57
  ```