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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -37,11 +37,11 @@ def sayPoetry(prompt, temp=0.95, topk = 50, topp = 0.92, penalty=1.0):
37
  return poetry
38
  poetry = gr.Interface(fn=sayPoetry,
39
  inputs=[
40
- gr.Textbox(label="Enter short prompt or select from examples:", placeholder="أنا الذي"),
41
- gr.Slider(0.80, 1.0, step=0.01,default=0.95, label='control temperature'),
42
  gr.Slider(25, 100, step=1,default=50, label='control top k'),
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
 
@@ -49,6 +49,6 @@ poetry = gr.Interface(fn=sayPoetry,
49
  title='Arabic Poetry Generation Demo (updated Jan. 2023)',
50
  description = "A simple demo of AI generated poetry based on 1M poems fine-tuned using AraGPT2 (be patient, runs on cpu)",
51
  examples=samples,
52
- #cache_examples=False,
53
  article = notes)
54
  poetry.launch()
 
37
  return poetry
38
  poetry = gr.Interface(fn=sayPoetry,
39
  inputs=[
40
+ gr.Textbox(label="Enter short prompt or select from examples:"),
41
+ gr.Slider(0.80, 1.0, step=0.01,default=0.99, label='control temperature'),
42
  gr.Slider(25, 100, step=1,default=50, label='control top k'),
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.0, label='control penalty'),
45
  ],
46
  outputs=[gr.Textbox(label="Generated Poetry:")],
47
 
 
49
  title='Arabic Poetry Generation Demo (updated Jan. 2023)',
50
  description = "A simple demo of AI generated poetry based on 1M poems fine-tuned using AraGPT2 (be patient, runs on cpu)",
51
  examples=samples,
52
+ cache_examples=False,
53
  article = notes)
54
  poetry.launch()