rwightman HF staff commited on
Commit
02c5d0f
1 Parent(s): f2d7f1f

Update app.py

Browse files

Redo search on enter key

Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -161,7 +161,13 @@ with gr.Blocks(title="The timm Leaderboard") as app:
161
  plot = gr.Plot()
162
 
163
  app.load(update_leaderboard_and_plot, outputs=[leaderboard, plot])
164
-
 
 
 
 
 
 
165
  update_btn.click(
166
  update_leaderboard_and_plot,
167
  inputs=[search_bar, sort_dropdown, x_axis, y_axis],
 
161
  plot = gr.Plot()
162
 
163
  app.load(update_leaderboard_and_plot, outputs=[leaderboard, plot])
164
+
165
+ search_bar.submit(
166
+ update_leaderboard_and_plot,
167
+ inputs=[search_bar, sort_dropdown, x_axis, y_axis],
168
+ outputs=[leaderboard, plot]
169
+ )
170
+
171
  update_btn.click(
172
  update_leaderboard_and_plot,
173
  inputs=[search_bar, sort_dropdown, x_axis, y_axis],