zhwang4ai commited on
Commit
8a0647b
·
1 Parent(s): 3504b6a

fox search bugs

Browse files
Files changed (1) hide show
  1. app.py +22 -0
app.py CHANGED
@@ -150,19 +150,41 @@ with demo:
150
  # search_bar.submit(filter_and_search, inputs=[cols_bar, search_bar], outputs=[leaderboard_table])
151
  with gr.TabItem("Success Rates - Detailed"):
152
  with gr.Row():
 
 
 
 
 
 
 
 
 
153
  detailed_success_rate_table = gr.Dataframe(
154
  value=detailed_success_rate_df,
155
  wrap=True,
156
  column_widths=[350, 120] + [(150 + len(c)) for c in detailed_success_rate_df.columns[2:]],
157
  )
 
 
158
 
159
  with gr.TabItem("Action Counts - Detailed"):
160
  with gr.Row():
 
 
 
 
 
 
 
 
 
161
  detailed_action_counts_table = gr.Dataframe(
162
  value=detailed_action_counts_df,
163
  wrap=True,
164
  column_widths=[350, 120] + [(100 + len(c)) for c in detailed_action_counts_df.columns[2:]],
165
  )
 
 
166
 
167
  with gr.TabItem("About"):
168
  gr.Markdown(ABOUT)
 
150
  # search_bar.submit(filter_and_search, inputs=[cols_bar, search_bar], outputs=[leaderboard_table])
151
  with gr.TabItem("Success Rates - Detailed"):
152
  with gr.Row():
153
+ with gr.Row():
154
+ search_bar = gr.Textbox(placeholder="Search for your model...", show_label=False)
155
+
156
+ with gr.Row():
157
+ cols_bar = gr.CheckboxGroup(
158
+ choices=[c for c in detailed_success_rate_df.columns[2:] if c != "Average"],
159
+ show_label=False,
160
+ # info="Select columns to display",
161
+ )
162
  detailed_success_rate_table = gr.Dataframe(
163
  value=detailed_success_rate_df,
164
  wrap=True,
165
  column_widths=[350, 120] + [(150 + len(c)) for c in detailed_success_rate_df.columns[2:]],
166
  )
167
+ cols_bar.change(filter_and_search, inputs=[cols_bar, search_bar], outputs=[detailed_success_rate_df])
168
+ search_bar.submit(filter_and_search, inputs=[cols_bar, search_bar], outputs=[detailed_success_rate_df])
169
 
170
  with gr.TabItem("Action Counts - Detailed"):
171
  with gr.Row():
172
+ with gr.Row():
173
+ search_bar_1 = gr.Textbox(placeholder="Search for your model...", show_label=False)
174
+
175
+ with gr.Row():
176
+ cols_bar_1 = gr.CheckboxGroup(
177
+ choices=[c for c in detailed_action_counts_df.columns[2:] if c != "Average"],
178
+ show_label=False,
179
+ # info="Select columns to display",
180
+ )
181
  detailed_action_counts_table = gr.Dataframe(
182
  value=detailed_action_counts_df,
183
  wrap=True,
184
  column_widths=[350, 120] + [(100 + len(c)) for c in detailed_action_counts_df.columns[2:]],
185
  )
186
+ cols_bar_1.change(filter_and_search, inputs=[cols_bar_1, search_bar_1], outputs=[detailed_action_counts_table])
187
+ search_bar_1.submit(filter_and_search, inputs=[cols_bar_1, search_bar_1], outputs=[detailed_action_counts_table])
188
 
189
  with gr.TabItem("About"):
190
  gr.Markdown(ABOUT)