saintyboy commited on
Commit
d962c4a
1 Parent(s): 78c09a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -116,14 +116,14 @@ def generate_text(prompt, num_samples, max_new_tokens, temperature, top_k, top_p
116
  demo = gr.Interface(
117
  fn=generate_text,
118
  inputs=[
119
- gr.inputs.Textbox(lines=2, placeholder="Enter your prompt here...", default="Write a short story about a boy:"),
120
- gr.inputs.Slider(minimum=1, maximum=10, step=1, default=1, label="Number of Samples"),
121
- gr.inputs.Slider(minimum=10, maximum=200, step=1, default=75, label="Max New Tokens"),
122
- gr.inputs.Slider(minimum=0.1, maximum=1.0, step=0.1, default=0.8, label="Temperature"),
123
- gr.inputs.Slider(minimum=1, maximum=100, step=1, default=50, label="Top-k"),
124
- gr.inputs.Slider(minimum=0.1, maximum=1.0, step=0.1, default=0.85, label="Top-p"),
125
- gr.inputs.Slider(minimum=1.0, maximum=2.0, step=0.1, default=1.1, label="Repetition Penalty"),
126
- gr.inputs.Number(default=100264, label="End-of-Response Token ID")
127
  ],
128
  outputs="text",
129
  title="GPT Text Generator",
 
116
  demo = gr.Interface(
117
  fn=generate_text,
118
  inputs=[
119
+ gr.Textbox(lines=2, placeholder="Enter your prompt here...", value="Write a short story about a boy:"),
120
+ gr.Slider(minimum=1, maximum=10, step=1, value=1, label="Number of Samples"),
121
+ gr.Slider(minimum=10, maximum=200, step=1, value=75, label="Max New Tokens"),
122
+ gr.Slider(minimum=0.1, maximum=1.0, step=0.1, value=0.8, label="Temperature"),
123
+ gr.Slider(minimum=1, maximum=100, step=1, value=50, label="Top-k"),
124
+ gr.Slider(minimum=0.1, maximum=1.0, step=0.1, value=0.85, label="Top-p"),
125
+ gr.Slider(minimum=1.0, maximum=2.0, step=0.1, value=1.1, label="Repetition Penalty"),
126
+ gr.Number(value=100264, label="End-of-Response Token ID")
127
  ],
128
  outputs="text",
129
  title="GPT Text Generator",