akhooli commited on
Commit
a22b4d2
1 Parent(s): a09693e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -31,6 +31,7 @@ notes = """
31
  - Note/Disclaimer: may generate unaccepted or inappropriate content. Use at your own risk.
32
  """
33
  def sayPoetry(prompt, temp=1.0, topk = 50, topp = 1.0, penalty=1.0, seed=114):
 
34
  set_seed(seed)
35
  gen = pipe(prompt, max_length=96, do_sample=True, temperature=temp, top_k=topk, top_p=topp, repetition_penalty=penalty,
36
  min_length = 64, no_repeat_ngram_size = 3, return_full_text=True,
 
31
  - Note/Disclaimer: may generate unaccepted or inappropriate content. Use at your own risk.
32
  """
33
  def sayPoetry(prompt, temp=1.0, topk = 50, topp = 1.0, penalty=1.0, seed=114):
34
+ if not int(seed) >= 0: seed=114
35
  set_seed(seed)
36
  gen = pipe(prompt, max_length=96, do_sample=True, temperature=temp, top_k=topk, top_p=topp, repetition_penalty=penalty,
37
  min_length = 64, no_repeat_ngram_size = 3, return_full_text=True,