peter szemraj commited on
Commit
93b2cca
1 Parent(s): bc946c2

:art: imporve UI format symmetry

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -167,22 +167,17 @@ if __name__ == "__main__":
167
  )
168
  with gr.Row():
169
  model_size = gr.Radio(
170
- choices=["base", "large"], label="model size", value="large"
171
  )
172
  num_beams = gr.Radio(
173
  choices=[2, 3, 4],
174
- label="num beams",
175
  value=2,
176
  )
177
  gr.Markdown(
178
  "_The base model is less performant than the large model, but is faster and will accept up to 2048 words per input (Large model accepts up to 768)._"
179
  )
180
  with gr.Row():
181
- token_batch_length = gr.Radio(
182
- choices=[512, 768, 1024],
183
- label="token batch length",
184
- value=512,
185
- )
186
  length_penalty = gr.inputs.Slider(
187
  minimum=0.5,
188
  maximum=1.0,
@@ -190,6 +185,12 @@ if __name__ == "__main__":
190
  default=0.7,
191
  step=0.05,
192
  )
 
 
 
 
 
 
193
  with gr.Row():
194
  repetition_penalty = gr.inputs.Slider(
195
  minimum=1.0,
@@ -213,7 +214,7 @@ if __name__ == "__main__":
213
  )
214
  input_text = gr.Textbox(
215
  lines=6,
216
- label="input text",
217
  placeholder="Enter text to summarize, the text will be cleaned and truncated on Spaces. Narrative, academic (both papers and lecture transcription), and article text work well. May take a bit to generate depending on the input text :)",
218
  )
219
  gr.Markdown("Upload your own file:")
 
167
  )
168
  with gr.Row():
169
  model_size = gr.Radio(
170
+ choices=["base", "large"], label="Model Variant", value="large"
171
  )
172
  num_beams = gr.Radio(
173
  choices=[2, 3, 4],
174
+ label="Beam Search: # of Beams",
175
  value=2,
176
  )
177
  gr.Markdown(
178
  "_The base model is less performant than the large model, but is faster and will accept up to 2048 words per input (Large model accepts up to 768)._"
179
  )
180
  with gr.Row():
 
 
 
 
 
181
  length_penalty = gr.inputs.Slider(
182
  minimum=0.5,
183
  maximum=1.0,
 
185
  default=0.7,
186
  step=0.05,
187
  )
188
+ token_batch_length = gr.Radio(
189
+ choices=[512, 768, 1024],
190
+ label="token batch length",
191
+ value=512,
192
+ )
193
+
194
  with gr.Row():
195
  repetition_penalty = gr.inputs.Slider(
196
  minimum=1.0,
 
214
  )
215
  input_text = gr.Textbox(
216
  lines=6,
217
+ label="Input Text (for summarization)",
218
  placeholder="Enter text to summarize, the text will be cleaned and truncated on Spaces. Narrative, academic (both papers and lecture transcription), and article text work well. May take a bit to generate depending on the input text :)",
219
  )
220
  gr.Markdown("Upload your own file:")