Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,9 @@ nlp = pipeline('text-generation', model=model, tokenizer=tokenizer)
|
|
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=3, early_stopping=True)
|
|
|
17 |
print(prompt)
|
18 |
-
print(
|
19 |
return outs
|
20 |
|
21 |
|
|
|
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=3, early_stopping=True)
|
17 |
+
outs_json=outs.to_json(orient="records")
|
18 |
print(prompt)
|
19 |
+
print(outs_json)
|
20 |
return outs
|
21 |
|
22 |
|