Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ nlp = pipeline('text-generation', model=model, tokenizer=tokenizer)
|
|
13 |
|
14 |
def generate(prompt):
|
15 |
# generate 10 samples using contrastive search
|
16 |
-
outs = nlp(prompt, max_length=76, num_return_sequences=
|
17 |
print(prompt)
|
18 |
print(outs)
|
19 |
return outs
|
|
|
13 |
|
14 |
def generate(prompt):
|
15 |
# generate 10 samples using contrastive search
|
16 |
+
outs = nlp(prompt, max_length=76, num_return_sequences=3, do_sample=True, repetition_penalty=1.2, temperature=0.7, top_k=4, early_stopping=True)
|
17 |
print(prompt)
|
18 |
print(outs)
|
19 |
return outs
|