Commit
•
62c258b
1
Parent(s):
6325216
Update README.md
Browse files
README.md
CHANGED
@@ -144,7 +144,7 @@ import transformers
|
|
144 |
text = "Najważniejszym celem człowieka na ziemi jest"
|
145 |
|
146 |
pipeline = transformers.pipeline("text-generation", model=model, tokenizer=tokenizer)
|
147 |
-
sequences = pipeline(max_new_tokens=100, do_sample=True, top_k=50, eos_token_id=tokenizer.eos_token_id)
|
148 |
for seq in sequences:
|
149 |
print(f"Result: {seq['generated_text']}")
|
150 |
```
|
|
|
144 |
text = "Najważniejszym celem człowieka na ziemi jest"
|
145 |
|
146 |
pipeline = transformers.pipeline("text-generation", model=model, tokenizer=tokenizer)
|
147 |
+
sequences = pipeline(max_new_tokens=100, do_sample=True, top_k=50, eos_token_id=tokenizer.eos_token_id, text_inputs=text)
|
148 |
for seq in sequences:
|
149 |
print(f"Result: {seq['generated_text']}")
|
150 |
```
|