pufanyi commited on
Commit
59453ee
1 Parent(s): 4215684

Refactor init_leaderboard function to update data outputs to dataframe and improve dropdown UI

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -95,6 +95,9 @@ def init_leaderboard(dataframes):
95
  return update_data(subset, research_textbox, selected_columns)
96
 
97
  def update_data(subset, search_term, selected_columns):
 
 
 
98
  filtered_data = dataframes[subset][dataframes[subset]['Model Name'].str.contains(search_term, case=False)]
99
  selected_data = filtered_data[selected_columns]
100
  return gr.DataFrame(selected_data, type="pandas", datatype=[c.type for c in fields(AutoEvalColumn) if c.name in selected_columns])
 
95
  return update_data(subset, research_textbox, selected_columns)
96
 
97
  def update_data(subset, search_term, selected_columns):
98
+ print(subset)
99
+ print(search_term)
100
+ print(selected_columns)
101
  filtered_data = dataframes[subset][dataframes[subset]['Model Name'].str.contains(search_term, case=False)]
102
  selected_data = filtered_data[selected_columns]
103
  return gr.DataFrame(selected_data, type="pandas", datatype=[c.type for c in fields(AutoEvalColumn) if c.name in selected_columns])