AkashDataScience commited on
Commit
3508061
·
1 Parent(s): f640e74

Changinh default values

Browse files
Files changed (1) hide show
  1. app.py +11 -11
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.", 2, 20],
62
- ["Twin 4-month-olds slept in the shade of the palm tree while the mother tanned in the sun.", 2, 20],
63
- ["Happiness can be found in the depths of chocolate pudding.", 2, 20],
64
- ["Seek success, but always be prepared for random cats.", 2, 20],
65
- ["This made him feel like an old-style rootbeer float smells.", 2, 20],
66
- ["The view from the lighthouse excited even the most seasoned traveler.", 2, 20],
67
- ["I've always wanted to go to Tajikistan, but my cat would miss me.", 2, 20],
68
- ["He found rain fascinating yet unpleasant.", 2, 20],
69
- ["Plans for this weekend include turning wine into water.", 2, 20],
70
- ["Iron pyrite is the most foolish of all minerals.", 2, 20],
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=30, step=1, value=20, label="Maximum lenght of a sequence")
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")