Spaces:
Running
Running
Commit
Β·
01d6a6d
1
Parent(s):
9a13aa6
css plot
Browse files- app.py +11 -11
- src/assets/css_html_js.py +4 -0
app.py
CHANGED
|
@@ -86,7 +86,6 @@ def get_benchmark_plot(benchmark):
|
|
| 86 |
xaxis_title="Average H4 Score",
|
| 87 |
yaxis_title="Latency per 1000 Tokens (s)",
|
| 88 |
legend_title="Model Type",
|
| 89 |
-
width=1000,
|
| 90 |
)
|
| 91 |
|
| 92 |
fig.update_traces(
|
|
@@ -165,7 +164,7 @@ with demo:
|
|
| 165 |
headers=list(COLUMNS_MAPPING.values()),
|
| 166 |
elem_id="1xA100-table",
|
| 167 |
)
|
| 168 |
-
# Dummy
|
| 169 |
single_A100_for_search = gr.components.Dataframe(
|
| 170 |
value=single_A100_df,
|
| 171 |
datatype=COLUMNS_DATATYPES,
|
|
@@ -173,26 +172,27 @@ with demo:
|
|
| 173 |
max_rows=None,
|
| 174 |
visible=False,
|
| 175 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
|
| 177 |
with gr.TabItem("π₯οΈ A100-80GB Plot π", id=1):
|
| 178 |
# Original leaderboard plot
|
| 179 |
gr.HTML(SINGLE_A100_TEXT)
|
| 180 |
|
|
|
|
| 181 |
single_A100_plotly = gr.components.Plot(
|
| 182 |
value=single_A100_plot,
|
| 183 |
elem_id="1xA100-plot",
|
| 184 |
show_label=False,
|
| 185 |
)
|
| 186 |
|
| 187 |
-
# Callbacks
|
| 188 |
-
submit_button.click(
|
| 189 |
-
submit_query,
|
| 190 |
-
[
|
| 191 |
-
search_bar, backend_checkboxes, datatype_checkboxes, threshold_slider,
|
| 192 |
-
single_A100_for_search
|
| 193 |
-
],
|
| 194 |
-
[single_A100_leaderboard]
|
| 195 |
-
)
|
| 196 |
with gr.Row():
|
| 197 |
with gr.Accordion("π Citation", open=False):
|
| 198 |
citation_button = gr.Textbox(
|
|
|
|
| 86 |
xaxis_title="Average H4 Score",
|
| 87 |
yaxis_title="Latency per 1000 Tokens (s)",
|
| 88 |
legend_title="Model Type",
|
|
|
|
| 89 |
)
|
| 90 |
|
| 91 |
fig.update_traces(
|
|
|
|
| 164 |
headers=list(COLUMNS_MAPPING.values()),
|
| 165 |
elem_id="1xA100-table",
|
| 166 |
)
|
| 167 |
+
# Dummy dataframe for search
|
| 168 |
single_A100_for_search = gr.components.Dataframe(
|
| 169 |
value=single_A100_df,
|
| 170 |
datatype=COLUMNS_DATATYPES,
|
|
|
|
| 172 |
max_rows=None,
|
| 173 |
visible=False,
|
| 174 |
)
|
| 175 |
+
|
| 176 |
+
submit_button.click(
|
| 177 |
+
submit_query,
|
| 178 |
+
[
|
| 179 |
+
search_bar, backend_checkboxes, datatype_checkboxes, threshold_slider,
|
| 180 |
+
single_A100_for_search
|
| 181 |
+
],
|
| 182 |
+
[single_A100_leaderboard]
|
| 183 |
+
)
|
| 184 |
|
| 185 |
with gr.TabItem("π₯οΈ A100-80GB Plot π", id=1):
|
| 186 |
# Original leaderboard plot
|
| 187 |
gr.HTML(SINGLE_A100_TEXT)
|
| 188 |
|
| 189 |
+
# Original leaderboard plot
|
| 190 |
single_A100_plotly = gr.components.Plot(
|
| 191 |
value=single_A100_plot,
|
| 192 |
elem_id="1xA100-plot",
|
| 193 |
show_label=False,
|
| 194 |
)
|
| 195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
with gr.Row():
|
| 197 |
with gr.Accordion("π Citation", open=False):
|
| 198 |
citation_button = gr.Textbox(
|
src/assets/css_html_js.py
CHANGED
|
@@ -36,6 +36,10 @@ table th:first-child {
|
|
| 36 |
.tab-buttons button {
|
| 37 |
font-size: 20px;
|
| 38 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
"""
|
| 40 |
|
| 41 |
get_window_url_params = """
|
|
|
|
| 36 |
.tab-buttons button {
|
| 37 |
font-size: 20px;
|
| 38 |
}
|
| 39 |
+
#1x100A-plot {
|
| 40 |
+
width: 100%;
|
| 41 |
+
height: 100%;
|
| 42 |
+
}
|
| 43 |
"""
|
| 44 |
|
| 45 |
get_window_url_params = """
|