akhooli commited on
Commit
af9ad6d
1 Parent(s): f64aba2

Update app.py

Browse files

do sample true

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -30,7 +30,7 @@ notes = """
30
  - Note/Disclaimer: may generate unaccepted or inappropriate content. Use at your own risk.
31
  """
32
  def sayPoetry(prompt, temp=1.0, topk = 50, topp = 1.0, penalty=1.0):
33
- gen = pipe(prompt, max_length=96, temperature = temp, top_k=topk, top_p=topp, do_sample = True, repetition_penalty=penalty)[0]["generated_text"]
34
  poetry =""
35
  for line in gen.split('.')[:-1]:
36
  poetry += line #+ "\n"
 
30
  - Note/Disclaimer: may generate unaccepted or inappropriate content. Use at your own risk.
31
  """
32
  def sayPoetry(prompt, temp=1.0, topk = 50, topp = 1.0, penalty=1.0):
33
+ gen = pipe(prompt, max_length=96, do_sample=True, temperature=temp, top_k=topk, top_p=topp, repetition_penalty=penalty)[0]["generated_text"]
34
  poetry =""
35
  for line in gen.split('.')[:-1]:
36
  poetry += line #+ "\n"