Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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:"
|
41 |
-
gr.Slider(0.80, 1.0, step=0.01,default=0.
|
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.
|
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 |
-
|
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()
|