Remove wrapping of model names; still wrap on headers (#67)
Browse files- Remove wrapping of model names; still wrap on headers (95d80dded01526c1f6578f5e3a18cb08cf0b1fe3)
app.py
CHANGED
|
@@ -1206,7 +1206,24 @@ NUM_DATASETS = len(set(DATASETS))
|
|
| 1206 |
# NUM_LANGUAGES = len(set(LANGUAGES))
|
| 1207 |
NUM_MODELS = len(set(MODELS))
|
| 1208 |
|
| 1209 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1210 |
with block:
|
| 1211 |
gr.Markdown(f"""
|
| 1212 |
Massive Text Embedding Benchmark (MTEB) Leaderboard. To submit, refer to the <a href="https://github.com/embeddings-benchmark/mteb#leaderboard" target="_blank" style="text-decoration: underline">MTEB GitHub repository</a> 🤗 Refer to the [MTEB paper](https://arxiv.org/abs/2210.07316) for details on metrics, tasks and models.
|
|
@@ -1231,7 +1248,6 @@ with block:
|
|
| 1231 |
DATA_OVERALL,
|
| 1232 |
datatype=["number", "markdown"] + ["number"] * len(DATA_OVERALL.columns),
|
| 1233 |
type="pandas",
|
| 1234 |
-
wrap=True,
|
| 1235 |
)
|
| 1236 |
with gr.Row():
|
| 1237 |
data_run_overall = gr.Button("Refresh")
|
|
@@ -1250,7 +1266,6 @@ with block:
|
|
| 1250 |
DATA_OVERALL_ZH,
|
| 1251 |
datatype=["number", "markdown"] + ["number"] * len(DATA_OVERALL_ZH.columns),
|
| 1252 |
type="pandas",
|
| 1253 |
-
wrap=True,
|
| 1254 |
)
|
| 1255 |
with gr.Row():
|
| 1256 |
data_run_overall_zh = gr.Button("Refresh")
|
|
@@ -1269,7 +1284,6 @@ with block:
|
|
| 1269 |
DATA_OVERALL_PL,
|
| 1270 |
datatype=["number", "markdown"] + ["number"] * len(DATA_OVERALL_PL.columns),
|
| 1271 |
type="pandas",
|
| 1272 |
-
wrap=True,
|
| 1273 |
)
|
| 1274 |
with gr.Row():
|
| 1275 |
data_run_overall_pl = gr.Button("Refresh")
|
|
|
|
| 1206 |
# NUM_LANGUAGES = len(set(LANGUAGES))
|
| 1207 |
NUM_MODELS = len(set(MODELS))
|
| 1208 |
|
| 1209 |
+
# 1. Force headers to wrap
|
| 1210 |
+
# 2. Force model column (maximum) width
|
| 1211 |
+
# 3. Prevent model column from overflowing, scroll instead
|
| 1212 |
+
css = """
|
| 1213 |
+
table > thead {
|
| 1214 |
+
white-space: normal
|
| 1215 |
+
}
|
| 1216 |
+
|
| 1217 |
+
table {
|
| 1218 |
+
--cell-width-1: 350px
|
| 1219 |
+
}
|
| 1220 |
+
|
| 1221 |
+
table > tbody > tr > td:nth-child(2) > div {
|
| 1222 |
+
overflow-x: scroll
|
| 1223 |
+
}
|
| 1224 |
+
"""
|
| 1225 |
+
|
| 1226 |
+
block = gr.Blocks(css=css)
|
| 1227 |
with block:
|
| 1228 |
gr.Markdown(f"""
|
| 1229 |
Massive Text Embedding Benchmark (MTEB) Leaderboard. To submit, refer to the <a href="https://github.com/embeddings-benchmark/mteb#leaderboard" target="_blank" style="text-decoration: underline">MTEB GitHub repository</a> 🤗 Refer to the [MTEB paper](https://arxiv.org/abs/2210.07316) for details on metrics, tasks and models.
|
|
|
|
| 1248 |
DATA_OVERALL,
|
| 1249 |
datatype=["number", "markdown"] + ["number"] * len(DATA_OVERALL.columns),
|
| 1250 |
type="pandas",
|
|
|
|
| 1251 |
)
|
| 1252 |
with gr.Row():
|
| 1253 |
data_run_overall = gr.Button("Refresh")
|
|
|
|
| 1266 |
DATA_OVERALL_ZH,
|
| 1267 |
datatype=["number", "markdown"] + ["number"] * len(DATA_OVERALL_ZH.columns),
|
| 1268 |
type="pandas",
|
|
|
|
| 1269 |
)
|
| 1270 |
with gr.Row():
|
| 1271 |
data_run_overall_zh = gr.Button("Refresh")
|
|
|
|
| 1284 |
DATA_OVERALL_PL,
|
| 1285 |
datatype=["number", "markdown"] + ["number"] * len(DATA_OVERALL_PL.columns),
|
| 1286 |
type="pandas",
|
|
|
|
| 1287 |
)
|
| 1288 |
with gr.Row():
|
| 1289 |
data_run_overall_pl = gr.Button("Refresh")
|