fix bugs
Browse files
app.py
CHANGED
@@ -98,9 +98,9 @@ detailed_success_rate_df = prep_detailed_success_rate_df()
|
|
98 |
detailed_action_counts_df = prep_detailed_action_counts_df()
|
99 |
|
100 |
# Function to update the table based on search query
|
101 |
-
def filter_and_search(cols: list[str], search_query: str, agg: str):
|
102 |
-
print("filter")
|
103 |
-
df =
|
104 |
search_terms = "Model"
|
105 |
if len(search_query) > 0:
|
106 |
search_terms = search_query.split(";")
|
@@ -164,8 +164,8 @@ with demo:
|
|
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_table])
|
168 |
-
search_bar.submit(filter_and_search, inputs=[cols_bar, search_bar], outputs=[detailed_success_rate_table])
|
169 |
|
170 |
with gr.TabItem("Action Counts - Detailed"):
|
171 |
with gr.Column():
|
@@ -183,8 +183,8 @@ with demo:
|
|
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)
|
|
|
98 |
detailed_action_counts_df = prep_detailed_action_counts_df()
|
99 |
|
100 |
# Function to update the table based on search query
|
101 |
+
def filter_and_search(cols: list[str], search_query: str, df, agg: str,):
|
102 |
+
# print("filter")
|
103 |
+
df = df
|
104 |
search_terms = "Model"
|
105 |
if len(search_query) > 0:
|
106 |
search_terms = search_query.split(";")
|
|
|
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, detailed_success_rate_table], outputs=[detailed_success_rate_table])
|
168 |
+
search_bar.submit(filter_and_search, inputs=[cols_bar, search_bar, detailed_success_rate_table], outputs=[detailed_success_rate_table])
|
169 |
|
170 |
with gr.TabItem("Action Counts - Detailed"):
|
171 |
with gr.Column():
|
|
|
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, detailed_action_counts_table], outputs=[detailed_action_counts_table])
|
187 |
+
search_bar_1.submit(filter_and_search, inputs=[cols_bar_1, search_bar_1, detailed_action_counts_table], outputs=[detailed_action_counts_table])
|
188 |
|
189 |
with gr.TabItem("About"):
|
190 |
gr.Markdown(ABOUT)
|