Spaces:
Runtime error
Runtime error
Commit
·
60daebc
1
Parent(s):
a733f28
add examples
Browse files
app.py
CHANGED
@@ -29,13 +29,18 @@ description = 'This is fine-tuned GPT-2 model for "conditional" generation. The
|
|
29 |
iface = gr.Interface(generate,
|
30 |
inputs = [
|
31 |
gr.Textbox(label="Keywords (comma separated)"),
|
32 |
-
gr.inputs.Slider(0, 2, default=
|
33 |
gr.inputs.Slider(1, 10, default=3, label="Number of beams", step=1),
|
34 |
gr.Number(label="Max lenght", value=128)
|
35 |
],
|
36 |
outputs = gr.Textbox(label="Output"),
|
37 |
title=title,
|
38 |
-
description=description
|
|
|
|
|
|
|
|
|
|
|
39 |
)
|
40 |
|
41 |
iface.queue()
|
|
|
29 |
iface = gr.Interface(generate,
|
30 |
inputs = [
|
31 |
gr.Textbox(label="Keywords (comma separated)"),
|
32 |
+
gr.inputs.Slider(0, 2, default=0.95, step=0.05, label="Temperature"),
|
33 |
gr.inputs.Slider(1, 10, default=3, label="Number of beams", step=1),
|
34 |
gr.Number(label="Max lenght", value=128)
|
35 |
],
|
36 |
outputs = gr.Textbox(label="Output"),
|
37 |
title=title,
|
38 |
+
description=description,
|
39 |
+
examples=[
|
40 |
+
["time travel, magic, demons", 0.95, 3, 128],
|
41 |
+
["evil witch, revenge, castle, prison", 0.95, 3, 128],
|
42 |
+
["teleportation, ancient civilization, wizards", 0.95, 3, 128]
|
43 |
+
]
|
44 |
)
|
45 |
|
46 |
iface.queue()
|