Update README.md
Browse files
README.md
CHANGED
|
@@ -21,7 +21,7 @@ from transformers import pipeline
|
|
| 21 |
|
| 22 |
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
| 23 |
generator = pipeline("text-generation", model="cike-dev/GemmaOffensiveClassifier1", device="cuda")
|
| 24 |
-
output = generator([{"role": "user", "content": question}], max_new_tokens=
|
| 25 |
print(output["generated_text"])
|
| 26 |
```
|
| 27 |
|
|
|
|
| 21 |
|
| 22 |
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
| 23 |
generator = pipeline("text-generation", model="cike-dev/GemmaOffensiveClassifier1", device="cuda")
|
| 24 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=5, return_full_text=False)[0]
|
| 25 |
print(output["generated_text"])
|
| 26 |
```
|
| 27 |
|