Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ from transformers import pipeline
|
|
| 18 |
def generate(prompt,textCount=40):
|
| 19 |
if textCount == None or textCount < 40:
|
| 20 |
textCount = 40
|
| 21 |
-
generator = pipeline('text-generation', model="facebook/opt-1.3b", max_length=textCount)
|
| 22 |
out = generator(prompt)
|
| 23 |
|
| 24 |
|
|
|
|
| 18 |
def generate(prompt,textCount=40):
|
| 19 |
if textCount == None or textCount < 40:
|
| 20 |
textCount = 40
|
| 21 |
+
generator = pipeline('text-generation', model="facebook/opt-1.3b", do_sample=True, num_return_sequences=2, max_length=textCount)
|
| 22 |
out = generator(prompt)
|
| 23 |
|
| 24 |
|