akhooli commited on
Commit
4bc2916
1 Parent(s): a790f5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -27,7 +27,7 @@ notes = """
27
  - The '.' means start a new line from no prompt (your prompt need not be long)
28
  - Be patient: this runs on CPU (free tier)
29
  - Feedback (Twitter): @akhooli (https://twitter.com/akhooli/status/1611025232201977859)
30
- - Note/Disclaimer: may generate unaccepted or inappropriate contednt. Use at your own risk.
31
  """
32
  def sayPoetry(prompt, temp=0.95, topk = 50, topp = 0.92, penalty=1.0):
33
  gen = pipe(prompt, max_length=96, temperature = temp, top_k=topk, top_p=topp, repetition_penalty=penalty)[0]["generated_text"]
@@ -43,7 +43,7 @@ poetry = gr.Interface(fn=sayPoetry,
43
  gr.Slider(0.80, 1.0, step=0.01,default=1.0, label='control top p'),
44
  gr.Slider(0.90, 1.20, step=0.01,default=1.20, label='control penalty'),
45
  ],
46
- outputs=[gr.outputs.Textbox(label="Generated Poetry:")],
47
 
48
  allow_flagging='never',
49
  title='Arabic Poetry Generation Demo (updated Jan. 2023)',
 
27
  - The '.' means start a new line from no prompt (your prompt need not be long)
28
  - Be patient: this runs on CPU (free tier)
29
  - Feedback (Twitter): @akhooli (https://twitter.com/akhooli/status/1611025232201977859)
30
+ - Note/Disclaimer: may generate unaccepted or inappropriate content. Use at your own risk.
31
  """
32
  def sayPoetry(prompt, temp=0.95, topk = 50, topp = 0.92, penalty=1.0):
33
  gen = pipe(prompt, max_length=96, temperature = temp, top_k=topk, top_p=topp, repetition_penalty=penalty)[0]["generated_text"]
 
43
  gr.Slider(0.80, 1.0, step=0.01,default=1.0, label='control top p'),
44
  gr.Slider(0.90, 1.20, step=0.01,default=1.20, label='control penalty'),
45
  ],
46
+ outputs=[gr.Textbox(label="Generated Poetry:")],
47
 
48
  allow_flagging='never',
49
  title='Arabic Poetry Generation Demo (updated Jan. 2023)',