Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files
app/__pycache__/draw_diagram.cpython-312.pyc
CHANGED
|
Binary files a/app/__pycache__/draw_diagram.cpython-312.pyc and b/app/__pycache__/draw_diagram.cpython-312.pyc differ
|
|
|
app/draw_diagram.py
CHANGED
|
@@ -75,7 +75,17 @@ def draw_cross_lingual(category_one, category_two, sort, sorted):
|
|
| 75 |
subtitle = ''
|
| 76 |
data_path = f'{folder}/{category_one}/{category_two}.csv'
|
| 77 |
chart_data = pd.read_csv(data_path).dropna(axis='columns').round(3)
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
if sorted == 'Ascending':
|
| 80 |
ascend = True
|
| 81 |
else:
|
|
@@ -86,15 +96,7 @@ def draw_cross_lingual(category_one, category_two, sort, sorted):
|
|
| 86 |
min_value = round(chart_data.iloc[:, 1::].min().min() - 0.1, 1)
|
| 87 |
max_value = round(chart_data.iloc[:, 1::].max().max() + 0.1, 1)
|
| 88 |
|
| 89 |
-
|
| 90 |
-
<style>
|
| 91 |
-
.stMultiSelect [data-baseweb=select] span{
|
| 92 |
-
max-width: 800px;
|
| 93 |
-
font-size: 0.9rem;
|
| 94 |
-
}
|
| 95 |
-
</style>
|
| 96 |
-
""", unsafe_allow_html=True)
|
| 97 |
-
models = st.multiselect("Please choose the models", chart_data['Model'].tolist(), default = chart_data['Model'].tolist())
|
| 98 |
|
| 99 |
if category_two in ['cross_mmlu', 'cross_logiqa']:
|
| 100 |
# print(category_two)
|
|
@@ -121,7 +123,7 @@ def draw_cross_lingual(category_one, category_two, sort, sorted):
|
|
| 121 |
"type": "category",
|
| 122 |
"boundaryGap": True,
|
| 123 |
"triggerEvent": True,
|
| 124 |
-
"data":
|
| 125 |
}
|
| 126 |
],
|
| 127 |
"yAxis": [{"type": "value",
|
|
@@ -219,7 +221,7 @@ def draw_cross_lingual(category_one, category_two, sort, sorted):
|
|
| 219 |
{
|
| 220 |
"type": "category",
|
| 221 |
"boundaryGap": True,
|
| 222 |
-
"data":
|
| 223 |
}
|
| 224 |
],
|
| 225 |
"yAxis": [{"type": "value",
|
|
@@ -343,6 +345,7 @@ def draw_only_acc(folder_name, category_one, category_two, sorted):
|
|
| 343 |
</style>
|
| 344 |
""", unsafe_allow_html=True)
|
| 345 |
models = st.multiselect("Please choose the models", chart_data['Model'].tolist(), default = chart_data['Model'].tolist())
|
|
|
|
| 346 |
|
| 347 |
if sorted == 'Ascending':
|
| 348 |
ascend = True
|
|
@@ -369,7 +372,7 @@ def draw_only_acc(folder_name, category_one, category_two, sorted):
|
|
| 369 |
"type": "category",
|
| 370 |
"boundaryGap": True,
|
| 371 |
"triggerEvent": True,
|
| 372 |
-
"data":
|
| 373 |
}
|
| 374 |
],
|
| 375 |
"yAxis": [{"type": "value",
|
|
@@ -424,17 +427,6 @@ def draw_flores_translation(category_one, category_two, sorted):
|
|
| 424 |
|
| 425 |
data_path = f'{folder}/{category_one}/{subtitle}.csv'
|
| 426 |
chart_data = pd.read_csv(data_path).round(3)
|
| 427 |
-
|
| 428 |
-
if sorted == 'Ascending':
|
| 429 |
-
ascend = True
|
| 430 |
-
else:
|
| 431 |
-
ascend = False
|
| 432 |
-
|
| 433 |
-
chart_data = chart_data.sort_values(by=['BLEU'], ascending=ascend)
|
| 434 |
-
|
| 435 |
-
min_value = round(chart_data.iloc[:, 1::].min().min() - 0.1, 1)
|
| 436 |
-
max_value = round(chart_data.iloc[:, 1::].max().max() + 0.1, 1)
|
| 437 |
-
|
| 438 |
st.markdown("""
|
| 439 |
<style>
|
| 440 |
.stMultiSelect [data-baseweb=select] span{
|
|
@@ -444,7 +436,18 @@ def draw_flores_translation(category_one, category_two, sorted):
|
|
| 444 |
</style>
|
| 445 |
""", unsafe_allow_html=True)
|
| 446 |
models = st.multiselect("Please choose the models", chart_data['Model'].tolist(), default = chart_data['Model'].tolist())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 447 |
|
|
|
|
|
|
|
|
|
|
| 448 |
options = {
|
| 449 |
"title": {"text": f"{category_two}"},
|
| 450 |
"tooltip": {
|
|
@@ -460,7 +463,7 @@ def draw_flores_translation(category_one, category_two, sorted):
|
|
| 460 |
"type": "category",
|
| 461 |
"boundaryGap": True,
|
| 462 |
"triggerEvent": True,
|
| 463 |
-
"data":
|
| 464 |
}
|
| 465 |
],
|
| 466 |
"yAxis": [{"type": "value",
|
|
@@ -523,7 +526,8 @@ def draw_dialogue(category_one, category_two, sort, sorted):
|
|
| 523 |
</style>
|
| 524 |
""", unsafe_allow_html=True)
|
| 525 |
models = st.multiselect("Please choose the models", chart_data['Model'].tolist(), default = chart_data['Model'].tolist())
|
| 526 |
-
|
|
|
|
| 527 |
if sorted == 'Ascending':
|
| 528 |
ascend = True
|
| 529 |
else:
|
|
@@ -534,6 +538,7 @@ def draw_dialogue(category_one, category_two, sort, sorted):
|
|
| 534 |
min_value = round(chart_data.iloc[:, 1::].min().min() - 0.1, 1)
|
| 535 |
max_value = round(chart_data.iloc[:, 1::].max().max() + 0.1, 1)
|
| 536 |
|
|
|
|
| 537 |
options = {}
|
| 538 |
if category_two in ['SAMSum', 'DialogSum']:
|
| 539 |
options = {
|
|
@@ -551,7 +556,7 @@ def draw_dialogue(category_one, category_two, sort, sorted):
|
|
| 551 |
"type": "category",
|
| 552 |
"boundaryGap": True,
|
| 553 |
"triggerEvent": True,
|
| 554 |
-
"data":
|
| 555 |
}
|
| 556 |
],
|
| 557 |
"yAxis": [{"type": "value",
|
|
@@ -601,7 +606,7 @@ def draw_dialogue(category_one, category_two, sort, sorted):
|
|
| 601 |
"type": "category",
|
| 602 |
"boundaryGap": True,
|
| 603 |
"triggerEvent": True,
|
| 604 |
-
"data":
|
| 605 |
}
|
| 606 |
],
|
| 607 |
"yAxis": [{"type": "value",
|
|
|
|
| 75 |
subtitle = ''
|
| 76 |
data_path = f'{folder}/{category_one}/{category_two}.csv'
|
| 77 |
chart_data = pd.read_csv(data_path).dropna(axis='columns').round(3)
|
| 78 |
+
st.markdown("""
|
| 79 |
+
<style>
|
| 80 |
+
.stMultiSelect [data-baseweb=select] span{
|
| 81 |
+
max-width: 800px;
|
| 82 |
+
font-size: 0.9rem;
|
| 83 |
+
}
|
| 84 |
+
</style>
|
| 85 |
+
""", unsafe_allow_html=True)
|
| 86 |
+
models = st.multiselect("Please choose the models", chart_data['Model'].tolist(), default = chart_data['Model'].tolist())
|
| 87 |
+
chart_data = chart_data[chart_data['Model'].isin(models)]
|
| 88 |
+
|
| 89 |
if sorted == 'Ascending':
|
| 90 |
ascend = True
|
| 91 |
else:
|
|
|
|
| 96 |
min_value = round(chart_data.iloc[:, 1::].min().min() - 0.1, 1)
|
| 97 |
max_value = round(chart_data.iloc[:, 1::].max().max() + 0.1, 1)
|
| 98 |
|
| 99 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
|
| 101 |
if category_two in ['cross_mmlu', 'cross_logiqa']:
|
| 102 |
# print(category_two)
|
|
|
|
| 123 |
"type": "category",
|
| 124 |
"boundaryGap": True,
|
| 125 |
"triggerEvent": True,
|
| 126 |
+
"data": chart_data['Model'].tolist(),
|
| 127 |
}
|
| 128 |
],
|
| 129 |
"yAxis": [{"type": "value",
|
|
|
|
| 221 |
{
|
| 222 |
"type": "category",
|
| 223 |
"boundaryGap": True,
|
| 224 |
+
"data": chart_data['Model'].tolist(),
|
| 225 |
}
|
| 226 |
],
|
| 227 |
"yAxis": [{"type": "value",
|
|
|
|
| 345 |
</style>
|
| 346 |
""", unsafe_allow_html=True)
|
| 347 |
models = st.multiselect("Please choose the models", chart_data['Model'].tolist(), default = chart_data['Model'].tolist())
|
| 348 |
+
chart_data = chart_data[chart_data['Model'].isin(models)]
|
| 349 |
|
| 350 |
if sorted == 'Ascending':
|
| 351 |
ascend = True
|
|
|
|
| 372 |
"type": "category",
|
| 373 |
"boundaryGap": True,
|
| 374 |
"triggerEvent": True,
|
| 375 |
+
"data": chart_data['Model'].tolist(),
|
| 376 |
}
|
| 377 |
],
|
| 378 |
"yAxis": [{"type": "value",
|
|
|
|
| 427 |
|
| 428 |
data_path = f'{folder}/{category_one}/{subtitle}.csv'
|
| 429 |
chart_data = pd.read_csv(data_path).round(3)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 430 |
st.markdown("""
|
| 431 |
<style>
|
| 432 |
.stMultiSelect [data-baseweb=select] span{
|
|
|
|
| 436 |
</style>
|
| 437 |
""", unsafe_allow_html=True)
|
| 438 |
models = st.multiselect("Please choose the models", chart_data['Model'].tolist(), default = chart_data['Model'].tolist())
|
| 439 |
+
chart_data = chart_data[chart_data['Model'].isin(models)]
|
| 440 |
+
|
| 441 |
+
if sorted == 'Ascending':
|
| 442 |
+
ascend = True
|
| 443 |
+
else:
|
| 444 |
+
ascend = False
|
| 445 |
+
|
| 446 |
+
chart_data = chart_data.sort_values(by=['BLEU'], ascending=ascend)
|
| 447 |
|
| 448 |
+
min_value = round(chart_data.iloc[:, 1::].min().min() - 0.1, 1)
|
| 449 |
+
max_value = round(chart_data.iloc[:, 1::].max().max() + 0.1, 1)
|
| 450 |
+
|
| 451 |
options = {
|
| 452 |
"title": {"text": f"{category_two}"},
|
| 453 |
"tooltip": {
|
|
|
|
| 463 |
"type": "category",
|
| 464 |
"boundaryGap": True,
|
| 465 |
"triggerEvent": True,
|
| 466 |
+
"data": chart_data['Model'].tolist(),
|
| 467 |
}
|
| 468 |
],
|
| 469 |
"yAxis": [{"type": "value",
|
|
|
|
| 526 |
</style>
|
| 527 |
""", unsafe_allow_html=True)
|
| 528 |
models = st.multiselect("Please choose the models", chart_data['Model'].tolist(), default = chart_data['Model'].tolist())
|
| 529 |
+
chart_data = chart_data[chart_data['Model'].isin(models)]
|
| 530 |
+
|
| 531 |
if sorted == 'Ascending':
|
| 532 |
ascend = True
|
| 533 |
else:
|
|
|
|
| 538 |
min_value = round(chart_data.iloc[:, 1::].min().min() - 0.1, 1)
|
| 539 |
max_value = round(chart_data.iloc[:, 1::].max().max() + 0.1, 1)
|
| 540 |
|
| 541 |
+
|
| 542 |
options = {}
|
| 543 |
if category_two in ['SAMSum', 'DialogSum']:
|
| 544 |
options = {
|
|
|
|
| 556 |
"type": "category",
|
| 557 |
"boundaryGap": True,
|
| 558 |
"triggerEvent": True,
|
| 559 |
+
"data": chart_data['Model'].tolist(),
|
| 560 |
}
|
| 561 |
],
|
| 562 |
"yAxis": [{"type": "value",
|
|
|
|
| 606 |
"type": "category",
|
| 607 |
"boundaryGap": True,
|
| 608 |
"triggerEvent": True,
|
| 609 |
+
"data": chart_data['Model'].tolist(),
|
| 610 |
}
|
| 611 |
],
|
| 612 |
"yAxis": [{"type": "value",
|