Update app.py
Browse files
app.py
CHANGED
|
@@ -107,11 +107,26 @@ def show_results_tab(df):
|
|
| 107 |
|
| 108 |
|
| 109 |
with gr.Row():
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
|
| 116 |
with gr.Column():
|
| 117 |
table = gr.DataFrame(
|
|
@@ -121,11 +136,23 @@ def show_results_tab(df):
|
|
| 121 |
column_widths=calculate_column_widths(df),
|
| 122 |
)
|
| 123 |
|
|
|
|
| 124 |
model_name.submit(
|
| 125 |
fn=filter_df,
|
| 126 |
inputs=model_name,
|
| 127 |
outputs=table
|
| 128 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
|
| 130 |
|
| 131 |
|
|
|
|
| 107 |
|
| 108 |
|
| 109 |
with gr.Row():
|
| 110 |
+
with gr.Column():
|
| 111 |
+
model_name = gr.Textbox(
|
| 112 |
+
value='Input the Model Name',
|
| 113 |
+
label='Search Model Name',
|
| 114 |
+
interactive=True
|
| 115 |
+
)
|
| 116 |
+
with gr.Column():
|
| 117 |
+
size_filter = gr.CheckboxGroup(
|
| 118 |
+
choices=MODEL_SIZE,
|
| 119 |
+
value=MODEL_SIZE,
|
| 120 |
+
label='Model Size',
|
| 121 |
+
interactive=True,
|
| 122 |
+
)
|
| 123 |
+
with gr.Column():
|
| 124 |
+
type_filter = gr.CheckboxGroup(
|
| 125 |
+
choices=MODEL_TYPE,
|
| 126 |
+
value=MODEL_TYPE,
|
| 127 |
+
label='Model Type',
|
| 128 |
+
interactive=True,
|
| 129 |
+
)
|
| 130 |
|
| 131 |
with gr.Column():
|
| 132 |
table = gr.DataFrame(
|
|
|
|
| 136 |
column_widths=calculate_column_widths(df),
|
| 137 |
)
|
| 138 |
|
| 139 |
+
|
| 140 |
model_name.submit(
|
| 141 |
fn=filter_df,
|
| 142 |
inputs=model_name,
|
| 143 |
outputs=table
|
| 144 |
)
|
| 145 |
+
size_filter.change(
|
| 146 |
+
fn=update_table,
|
| 147 |
+
inputs=[size_filter, type_filter],
|
| 148 |
+
outputs=table,
|
| 149 |
+
)
|
| 150 |
+
type_filter.change(
|
| 151 |
+
fn=update_table,
|
| 152 |
+
inputs=[size_filter, type_filter],
|
| 153 |
+
outputs=table,
|
| 154 |
+
)
|
| 155 |
+
|
| 156 |
|
| 157 |
|
| 158 |
|