king007 commited on
Commit
0108d1f
1 Parent(s): 316b5de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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(outs)
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