joaogante HF staff commited on
Commit
3f8b242
1 Parent(s): 3fa1f3a

no, column is better

Browse files
Files changed (1) hide show
  1. app.py +21 -20
app.py CHANGED
@@ -186,27 +186,28 @@ with demo:
186
  with gr.Tabs():
187
  with gr.TabItem("Greedy Search"):
188
  plot_fn = functools.partial(get_plot, generate_type="Greedy Search")
189
- gr.Markdown(
190
- """
191
- ### Greedy Search benchmark parameters
192
- - `max_new_tokens = 64`;
193
- - `pad_to_multiple_of = 64` for Tensorflow XLA models. Others do not pad (input prompts between 2 and 33 tokens).
194
- """
195
- )
196
  with gr.Row():
197
- model_selector = gr.Dropdown(
198
- choices=["DistilGPT2", "GPT2", "OPT-1.3B", "GPTJ-6B", "T5 Small", "T5 Base", "T5 Large", "T5 3B"],
199
- value="T5 Small",
200
- label="Model",
201
- interactive=True,
202
- )
203
- eager_enabler = gr.Radio(
204
- ["Yes", "No"],
205
- value="Yes",
206
- label="Plot TF Eager Execution?",
207
- interactive=True
208
- )
209
- plot = gr.Image(value=plot_fn("T5 Small", "Yes")) # Show plot when the gradio app is initialized
 
 
 
 
 
 
 
 
210
  model_selector.change(fn=plot_fn, inputs=[model_selector, eager_enabler], outputs=plot)
211
  eager_enabler.change(fn=plot_fn, inputs=[model_selector, eager_enabler], outputs=plot)
212
  with gr.TabItem("Sample"):
 
186
  with gr.Tabs():
187
  with gr.TabItem("Greedy Search"):
188
  plot_fn = functools.partial(get_plot, generate_type="Greedy Search")
 
 
 
 
 
 
 
189
  with gr.Row():
190
+ with gr.Column():
191
+ model_selector = gr.Dropdown(
192
+ choices=["DistilGPT2", "GPT2", "OPT-1.3B", "GPTJ-6B", "T5 Small", "T5 Base", "T5 Large", "T5 3B"],
193
+ value="T5 Small",
194
+ label="Model",
195
+ interactive=True,
196
+ )
197
+ eager_enabler = gr.Radio(
198
+ ["Yes", "No"],
199
+ value="Yes",
200
+ label="Plot TF Eager Execution?",
201
+ interactive=True
202
+ )
203
+ gr.Markdown(
204
+ """
205
+ ### Greedy Search benchmark parameters
206
+ - `max_new_tokens = 64`;
207
+ - `pad_to_multiple_of = 64` for Tensorflow XLA models. Others do not pad (input prompts between 2 and 33 tokens).
208
+ """
209
+ )
210
+ plot = gr.Image(value=plot_fn("T5 Small", "Yes")) # Show plot when the gradio app is initialized
211
  model_selector.change(fn=plot_fn, inputs=[model_selector, eager_enabler], outputs=plot)
212
  eager_enabler.change(fn=plot_fn, inputs=[model_selector, eager_enabler], outputs=plot)
213
  with gr.TabItem("Sample"):