akhooli commited on
Commit
0c1ca19
1 Parent(s): 8600b72

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -30,7 +30,8 @@ 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, 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, temperature = temp, top_k=topk, top_p=topp, do_sample = True,
34
+ repetition_penalty=penalty)[0]["generated_text"]
35
  poetry =""
36
  for line in gen.split('.')[:-1]:
37
  poetry += line #+ "\n"