hysts HF staff commited on
Commit
91d92c5
1 Parent(s): 0255312

Delete hidden_search_bar

Browse files
Files changed (1) hide show
  1. app.py +0 -15
app.py CHANGED
@@ -233,14 +233,6 @@ def update_table(
233
  return df
234
 
235
 
236
- def load_query(request: gr.Request): # triggered only once at startup => read query parameter if it exists
237
- query = request.query_params.get("query") or ""
238
- return (
239
- query,
240
- query,
241
- ) # return one for the "search_bar", one for a hidden component that triggers a reload only if value has changed
242
-
243
-
244
  # Prepare the dataframes
245
 
246
 
@@ -495,9 +487,6 @@ with gr.Blocks() as demo_leaderboard:
495
  graph_size_vs_score = gr.Plot(label="Model size vs. Average score")
496
  graph_average_scores = gr.Plot(label="Model Performance across Task Categories")
497
 
498
- # Define a hidden component that will trigger a reload only if a query parameter has been set
499
- hidden_search_bar = gr.Textbox(value="", visible=False)
500
-
501
  select_all_button.click(
502
  fn=lambda: toggle_all_categories("all"),
503
  outputs=checkboxes,
@@ -519,7 +508,6 @@ with gr.Blocks() as demo_leaderboard:
519
 
520
  gr.on(
521
  triggers=[
522
- hidden_search_bar.change,
523
  filter_columns_type.change,
524
  filter_columns_precision.change,
525
  filter_columns_size.change,
@@ -561,9 +549,6 @@ with gr.Blocks() as demo_leaderboard:
561
  queue=False,
562
  )
563
 
564
- # Check query parameter once at startup and update search bar + hidden component
565
- demo_leaderboard.load(fn=load_query, outputs=[search_bar, hidden_search_bar])
566
-
567
 
568
  # Submission demo
569
 
 
233
  return df
234
 
235
 
 
 
 
 
 
 
 
 
236
  # Prepare the dataframes
237
 
238
 
 
487
  graph_size_vs_score = gr.Plot(label="Model size vs. Average score")
488
  graph_average_scores = gr.Plot(label="Model Performance across Task Categories")
489
 
 
 
 
490
  select_all_button.click(
491
  fn=lambda: toggle_all_categories("all"),
492
  outputs=checkboxes,
 
508
 
509
  gr.on(
510
  triggers=[
 
511
  filter_columns_type.change,
512
  filter_columns_precision.change,
513
  filter_columns_size.change,
 
549
  queue=False,
550
  )
551
 
 
 
 
552
 
553
  # Submission demo
554