joaogante HF staff commited on
Commit
31b8889
1 Parent(s): 734ca59

playing around with gradio

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -153,8 +153,8 @@ with demo:
153
  label="Model",
154
  interactive=True,
155
  )
156
- plot = gr.Plot()
157
  plot_fn = functools.partial(get_plot, generate_type="Greedy Search")
 
158
  model_selector.change(fn=get_plot, inputs=[model_selector], outputs=plot)
159
  with gr.TabItem("Sample"):
160
  gr.Button("New Tiger")
 
153
  label="Model",
154
  interactive=True,
155
  )
 
156
  plot_fn = functools.partial(get_plot, generate_type="Greedy Search")
157
+ plot = gr.Plot(value=plot_fn("T5 Small")) # Show plot when the gradio app is initialized
158
  model_selector.change(fn=get_plot, inputs=[model_selector], outputs=plot)
159
  with gr.TabItem("Sample"):
160
  gr.Button("New Tiger")