Spaces:
Sleeping
Sleeping
Commit
·
3508061
1
Parent(s):
f640e74
Changinh default values
Browse files
app.py
CHANGED
@@ -58,23 +58,23 @@ def inference(input_text, num_return_sequences, max_length):
|
|
58 |
|
59 |
title = "GPT-2 trained on Shakespeare Plays dataset"
|
60 |
description = "A simple Gradio interface to generate text from GPT-2 model trained on Shakespeare Plays"
|
61 |
-
examples = [["Please put on these earmuffs because I can't hear you.",
|
62 |
-
["Twin 4-month-olds slept in the shade of the palm tree while the mother tanned in the sun.",
|
63 |
-
["Happiness can be found in the depths of chocolate pudding.",
|
64 |
-
["Seek success, but always be prepared for random cats.",
|
65 |
-
["This made him feel like an old-style rootbeer float smells.",
|
66 |
-
["The view from the lighthouse excited even the most seasoned traveler.",
|
67 |
-
["I've always wanted to go to Tajikistan, but my cat would miss me.",
|
68 |
-
["He found rain fascinating yet unpleasant.",
|
69 |
-
["Plans for this weekend include turning wine into water.",
|
70 |
-
["Iron pyrite is the most foolish of all minerals.",
|
71 |
]
|
72 |
demo = gr.Interface(
|
73 |
inference,
|
74 |
inputs = [
|
75 |
gr.Textbox(label="Enter some text", type="text"),
|
76 |
gr.Slider(minimum=1, maximum=5, step=1, value=5, label="Number of outputs"),
|
77 |
-
gr.Slider(minimum=10, maximum=
|
78 |
],
|
79 |
outputs = [
|
80 |
gr.Textbox(label="Output", type="text")
|
|
|
58 |
|
59 |
title = "GPT-2 trained on Shakespeare Plays dataset"
|
60 |
description = "A simple Gradio interface to generate text from GPT-2 model trained on Shakespeare Plays"
|
61 |
+
examples = [["Please put on these earmuffs because I can't hear you.", 5, 50],
|
62 |
+
["Twin 4-month-olds slept in the shade of the palm tree while the mother tanned in the sun.", 5, 50],
|
63 |
+
["Happiness can be found in the depths of chocolate pudding.", 5, 50],
|
64 |
+
["Seek success, but always be prepared for random cats.", 5, 50],
|
65 |
+
["This made him feel like an old-style rootbeer float smells.", 5, 50],
|
66 |
+
["The view from the lighthouse excited even the most seasoned traveler.", 5, 50],
|
67 |
+
["I've always wanted to go to Tajikistan, but my cat would miss me.", 5, 50],
|
68 |
+
["He found rain fascinating yet unpleasant.", 5, 50],
|
69 |
+
["Plans for this weekend include turning wine into water.", 5, 50],
|
70 |
+
["Iron pyrite is the most foolish of all minerals.", 5, 50],
|
71 |
]
|
72 |
demo = gr.Interface(
|
73 |
inference,
|
74 |
inputs = [
|
75 |
gr.Textbox(label="Enter some text", type="text"),
|
76 |
gr.Slider(minimum=1, maximum=5, step=1, value=5, label="Number of outputs"),
|
77 |
+
gr.Slider(minimum=10, maximum=100, step=1, value=50, label="Maximum lenght of a sequence")
|
78 |
],
|
79 |
outputs = [
|
80 |
gr.Textbox(label="Output", type="text")
|