Spaces:
Running
Running
BenchmarkBot
commited on
Commit
Β·
3d79a97
1
Parent(s):
0eea6c1
fix search
Browse files
app.py
CHANGED
@@ -60,8 +60,18 @@ def change_tab(query_param):
|
|
60 |
return gr.Tabs.update(selected=0)
|
61 |
|
62 |
|
63 |
-
def search_table(
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
return filtered_df
|
66 |
|
67 |
|
@@ -72,12 +82,23 @@ with demo:
|
|
72 |
gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
|
73 |
|
74 |
with gr.Row():
|
75 |
-
with gr.
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
83 |
with gr.TabItem("π₯οΈ A100-80GB Benchmark ποΈ", elem_id="A100-benchmark", id=0):
|
@@ -106,11 +127,6 @@ with demo:
|
|
106 |
max_rows=None,
|
107 |
visible=False,
|
108 |
)
|
109 |
-
search_bar.submit(
|
110 |
-
search_table,
|
111 |
-
[single_A100_for_search, search_bar],
|
112 |
-
single_A100_leaderboard,
|
113 |
-
)
|
114 |
|
115 |
MULTI_A100_TEXT = """<h3>Multi-GPU (4xA100):</h3>
|
116 |
<ul>
|
@@ -135,9 +151,14 @@ with demo:
|
|
135 |
)
|
136 |
search_bar.submit(
|
137 |
search_table,
|
138 |
-
[multi_A100_for_search, search_bar],
|
139 |
-
|
140 |
)
|
|
|
|
|
|
|
|
|
|
|
141 |
|
142 |
with gr.Row():
|
143 |
with gr.Accordion("π Citation", open=False):
|
|
|
60 |
return gr.Tabs.update(selected=0)
|
61 |
|
62 |
|
63 |
+
def search_table(dfs, query):
|
64 |
+
filtered_dfs = []
|
65 |
+
for df in dfs:
|
66 |
+
filtered_df = filter_table(df, query)
|
67 |
+
filtered_dfs.append(filtered_df)
|
68 |
+
|
69 |
+
return filtered_dfs
|
70 |
+
|
71 |
+
|
72 |
+
def filter_table(df, backends):
|
73 |
+
filtered_df = df[df["Backend π"].isin(
|
74 |
+
[backend.lower() for backend in backends])]
|
75 |
return filtered_df
|
76 |
|
77 |
|
|
|
82 |
gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
|
83 |
|
84 |
with gr.Row():
|
85 |
+
with gr.Column():
|
86 |
+
with gr.Box(elem_id="search-bar-table-box"):
|
87 |
+
search_bar = gr.Textbox(
|
88 |
+
label="Search π",
|
89 |
+
placeholder="Search your model and press ENTER...",
|
90 |
+
show_label=False,
|
91 |
+
elem_id="search-bar",
|
92 |
+
)
|
93 |
+
|
94 |
+
with gr.Column():
|
95 |
+
with gr.Box(elem_id="backend-checkboxes-box"):
|
96 |
+
backend_checkboxes = gr.CheckboxGroup(
|
97 |
+
["Pytorch", "OnnxRuntime"],
|
98 |
+
label="Backends π",
|
99 |
+
info="Select the backends you want to compare",
|
100 |
+
elem_id="backend-checkboxes",
|
101 |
+
)
|
102 |
|
103 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
104 |
with gr.TabItem("π₯οΈ A100-80GB Benchmark ποΈ", elem_id="A100-benchmark", id=0):
|
|
|
127 |
max_rows=None,
|
128 |
visible=False,
|
129 |
)
|
|
|
|
|
|
|
|
|
|
|
130 |
|
131 |
MULTI_A100_TEXT = """<h3>Multi-GPU (4xA100):</h3>
|
132 |
<ul>
|
|
|
151 |
)
|
152 |
search_bar.submit(
|
153 |
search_table,
|
154 |
+
[[single_A100_for_search, multi_A100_for_search], search_bar],
|
155 |
+
[single_A100_for_search, multi_A100_for_search],
|
156 |
)
|
157 |
+
# backend_checkboxes.select(
|
158 |
+
# filter_table,
|
159 |
+
# [single_A100_for_search, backend_checkboxes],
|
160 |
+
# multi_A100_leaderboard,
|
161 |
+
# )
|
162 |
|
163 |
with gr.Row():
|
164 |
with gr.Accordion("π Citation", open=False):
|