Spaces:
Running
Running
Commit
·
9d7fc91
1
Parent(s):
b4e02ad
Align models and Parameters to the left on the 'Other Models' tab
Browse files- app.py +3 -1
- style/css_html_js.py +19 -0
app.py
CHANGED
|
@@ -68,8 +68,10 @@ def make_leaderboard_tab(state: Simulator, name: str, html: str=None):
|
|
| 68 |
|
| 69 |
if name == "Other Models":
|
| 70 |
show = False
|
|
|
|
| 71 |
else:
|
| 72 |
show = True
|
|
|
|
| 73 |
# main leaderboard content
|
| 74 |
leaderboard = gr.DataFrame(
|
| 75 |
value=filter_leaderboard(C.DEFAULT_TASK, C.DEFAULT_BENCHMARK, C.DEFAULT_MODEL_TYPE, "", C.DEFAULT_MAX_PARAMS, state, name),
|
|
@@ -79,7 +81,7 @@ def make_leaderboard_tab(state: Simulator, name: str, html: str=None):
|
|
| 79 |
datatype=["html", "html"],
|
| 80 |
interactive=False,
|
| 81 |
column_widths=["7%", "28%", "13%", "10%", "13%", "10%", "14%"],
|
| 82 |
-
elem_classes=
|
| 83 |
)
|
| 84 |
|
| 85 |
# caption for the Base vs Instruct models
|
|
|
|
| 68 |
|
| 69 |
if name == "Other Models":
|
| 70 |
show = False
|
| 71 |
+
elem_classes = "dataframe-leaderboard dataframe-other-models"
|
| 72 |
else:
|
| 73 |
show = True
|
| 74 |
+
elem_classes = "dataframe-leaderboard"
|
| 75 |
# main leaderboard content
|
| 76 |
leaderboard = gr.DataFrame(
|
| 77 |
value=filter_leaderboard(C.DEFAULT_TASK, C.DEFAULT_BENCHMARK, C.DEFAULT_MODEL_TYPE, "", C.DEFAULT_MAX_PARAMS, state, name),
|
|
|
|
| 81 |
datatype=["html", "html"],
|
| 82 |
interactive=False,
|
| 83 |
column_widths=["7%", "28%", "13%", "10%", "13%", "10%", "14%"],
|
| 84 |
+
elem_classes=elem_classes,
|
| 85 |
)
|
| 86 |
|
| 87 |
# caption for the Base vs Instruct models
|
style/css_html_js.py
CHANGED
|
@@ -159,6 +159,25 @@ input[role="listbox"] {
|
|
| 159 |
text-align: left !important;
|
| 160 |
}
|
| 161 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
.gradio-container .contain {
|
| 163 |
flex-grow: 0;
|
| 164 |
}
|
|
|
|
| 159 |
text-align: left !important;
|
| 160 |
}
|
| 161 |
|
| 162 |
+
.dataframe-other-models tbody td:nth-child(2),
|
| 163 |
+
.dataframe-other-models tbody td:nth-child(3) {
|
| 164 |
+
text-align: left !important;
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
.dataframe-other-models thead th:nth-child(2) .cell-wrap,
|
| 168 |
+
.dataframe-other-models thead th:nth-child(2) .header-content,
|
| 169 |
+
.dataframe-other-models thead th:nth-child(2) .header-button,
|
| 170 |
+
.dataframe-other-models thead th:nth-child(2) .header-text,
|
| 171 |
+
.dataframe-other-models thead th:nth-child(2) .header-button span,
|
| 172 |
+
.dataframe-other-models thead th:nth-child(3) .cell-wrap,
|
| 173 |
+
.dataframe-other-models thead th:nth-child(3) .header-content,
|
| 174 |
+
.dataframe-other-models thead th:nth-child(3) .header-button,
|
| 175 |
+
.dataframe-other-models thead th:nth-child(3) .header-text,
|
| 176 |
+
.dataframe-other-models thead th:nth-child(3) .header-button span {
|
| 177 |
+
justify-content: flex-start !important;
|
| 178 |
+
text-align: left !important;
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
.gradio-container .contain {
|
| 182 |
flex-grow: 0;
|
| 183 |
}
|