readme: fix max_length parameter in text generation pipeline
Browse files
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"
|
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 |
```
|