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/__pycache__/draw_diagram_test.cpython-312.pyc
ADDED
Binary file (11.3 kB). View file
|
|
app/__pycache__/pages.cpython-312.pyc
CHANGED
Binary files a/app/__pycache__/pages.cpython-312.pyc and b/app/__pycache__/pages.cpython-312.pyc differ
|
|
app/draw_diagram.py
CHANGED
@@ -6,67 +6,67 @@ from streamlit_echarts import st_echarts
|
|
6 |
from streamlit_javascript import st_javascript
|
7 |
# from PIL import Image
|
8 |
|
9 |
-
links_dic = {"random": "https://seaeval.github.io/",
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
links_dic = {k.lower().replace('_', '-') : v for k, v in links_dic.items()}
|
51 |
-
|
52 |
-
# huggingface_image = Image.open('style/huggingface.jpg')
|
53 |
-
|
54 |
-
def nav_to(value):
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
def highlight_table_line(model_name):
|
68 |
-
|
69 |
-
|
70 |
|
71 |
|
72 |
def draw_cross_lingual(category_one, category_two, sort, sorted):
|
@@ -85,6 +85,16 @@ def draw_cross_lingual(category_one, category_two, sort, sorted):
|
|
85 |
|
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 |
if category_two in ['cross_mmlu', 'cross_logiqa']:
|
90 |
# print(category_two)
|
@@ -109,14 +119,15 @@ def draw_cross_lingual(category_one, category_two, sort, sorted):
|
|
109 |
"xAxis": [
|
110 |
{
|
111 |
"type": "category",
|
112 |
-
"boundaryGap":
|
113 |
"triggerEvent": True,
|
114 |
-
"data":
|
115 |
}
|
116 |
],
|
117 |
"yAxis": [{"type": "value",
|
118 |
"min": min_value,
|
119 |
"max": max_value,
|
|
|
120 |
# "splitNumber": 10
|
121 |
}],
|
122 |
"series": [
|
@@ -173,17 +184,17 @@ def draw_cross_lingual(category_one, category_two, sort, sorted):
|
|
173 |
],
|
174 |
}
|
175 |
|
176 |
-
events = {
|
177 |
-
|
178 |
-
|
179 |
-
}
|
180 |
|
181 |
-
value = st_echarts(options=options,
|
182 |
|
183 |
|
184 |
-
if value != None:
|
185 |
-
|
186 |
-
|
187 |
|
188 |
# if value != None:
|
189 |
# highlight_table_line(value)
|
@@ -207,13 +218,14 @@ def draw_cross_lingual(category_one, category_two, sort, sorted):
|
|
207 |
"xAxis": [
|
208 |
{
|
209 |
"type": "category",
|
210 |
-
"boundaryGap":
|
211 |
-
"data":
|
212 |
}
|
213 |
],
|
214 |
"yAxis": [{"type": "value",
|
215 |
"min": min_value,
|
216 |
"max": max_value,
|
|
|
217 |
# "splitNumber": 10
|
218 |
}],
|
219 |
"series": [
|
@@ -255,15 +267,15 @@ def draw_cross_lingual(category_one, category_two, sort, sorted):
|
|
255 |
],
|
256 |
}
|
257 |
|
258 |
-
events = {
|
259 |
-
|
260 |
-
}
|
261 |
|
262 |
-
value = st_echarts(options=options,
|
263 |
|
264 |
-
if value != None:
|
265 |
-
|
266 |
-
|
267 |
|
268 |
# if value != None:
|
269 |
# highlight_table_line(value)
|
@@ -321,6 +333,16 @@ def draw_only_acc(folder_name, category_one, category_two, sorted):
|
|
321 |
subtitle = category_two_dict[category_two]
|
322 |
data_path = f'{folder}/{category_one}/{subtitle}.csv'
|
323 |
chart_data = pd.read_csv(data_path).round(3)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
|
325 |
if sorted == 'Ascending':
|
326 |
ascend = True
|
@@ -345,14 +367,15 @@ def draw_only_acc(folder_name, category_one, category_two, sorted):
|
|
345 |
"xAxis": [
|
346 |
{
|
347 |
"type": "category",
|
348 |
-
"boundaryGap":
|
349 |
"triggerEvent": True,
|
350 |
-
"data":
|
351 |
}
|
352 |
],
|
353 |
"yAxis": [{"type": "value",
|
354 |
"min": min_value,
|
355 |
"max": max_value,
|
|
|
356 |
# "splitNumber": 10
|
357 |
}],
|
358 |
"series": [
|
@@ -365,15 +388,15 @@ def draw_only_acc(folder_name, category_one, category_two, sorted):
|
|
365 |
],
|
366 |
}
|
367 |
|
368 |
-
events = {
|
369 |
-
|
370 |
-
}
|
371 |
|
372 |
-
value = st_echarts(options=options,
|
373 |
|
374 |
-
if value != None:
|
375 |
-
|
376 |
-
|
377 |
|
378 |
# if value != None:
|
379 |
# highlight_table_line(value)
|
@@ -412,6 +435,16 @@ def draw_flores_translation(category_one, category_two, sorted):
|
|
412 |
min_value = round(chart_data.iloc[:, 1::].min().min() - 0.1, 1)
|
413 |
max_value = round(chart_data.iloc[:, 1::].max().max() + 0.1, 1)
|
414 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
415 |
options = {
|
416 |
"title": {"text": f"{category_two}"},
|
417 |
"tooltip": {
|
@@ -425,14 +458,15 @@ def draw_flores_translation(category_one, category_two, sorted):
|
|
425 |
"xAxis": [
|
426 |
{
|
427 |
"type": "category",
|
428 |
-
"boundaryGap":
|
429 |
"triggerEvent": True,
|
430 |
-
"data":
|
431 |
}
|
432 |
],
|
433 |
"yAxis": [{"type": "value",
|
434 |
"min": min_value,
|
435 |
"max": max_value,
|
|
|
436 |
# "splitNumber": 10
|
437 |
}],
|
438 |
"series": [
|
@@ -445,15 +479,15 @@ def draw_flores_translation(category_one, category_two, sorted):
|
|
445 |
],
|
446 |
}
|
447 |
|
448 |
-
events = {
|
449 |
-
|
450 |
-
}
|
451 |
|
452 |
-
value = st_echarts(options=options,
|
453 |
|
454 |
-
if value != None:
|
455 |
-
|
456 |
-
|
457 |
|
458 |
|
459 |
### create table
|
@@ -480,6 +514,16 @@ def draw_dialogue(category_one, category_two, sort, sorted):
|
|
480 |
data_path = f'{folder}/{category_one}/{subtitle}.csv'
|
481 |
chart_data = pd.read_csv(data_path).round(3)
|
482 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
483 |
if sorted == 'Ascending':
|
484 |
ascend = True
|
485 |
else:
|
@@ -505,14 +549,15 @@ def draw_dialogue(category_one, category_two, sort, sorted):
|
|
505 |
"xAxis": [
|
506 |
{
|
507 |
"type": "category",
|
508 |
-
"boundaryGap":
|
509 |
"triggerEvent": True,
|
510 |
-
"data":
|
511 |
}
|
512 |
],
|
513 |
"yAxis": [{"type": "value",
|
514 |
"min": min_value,
|
515 |
"max": max_value,
|
|
|
516 |
# "splitNumber": 10
|
517 |
}],
|
518 |
"series": [
|
@@ -554,15 +599,16 @@ def draw_dialogue(category_one, category_two, sort, sorted):
|
|
554 |
"xAxis": [
|
555 |
{
|
556 |
"type": "category",
|
557 |
-
"boundaryGap":
|
558 |
"triggerEvent": True,
|
559 |
-
"data":
|
560 |
}
|
561 |
],
|
562 |
"yAxis": [{"type": "value",
|
563 |
"min": min_value,
|
564 |
"max": max_value,
|
565 |
# "splitNumber": 10
|
|
|
566 |
}],
|
567 |
"series": [
|
568 |
{
|
@@ -574,15 +620,15 @@ def draw_dialogue(category_one, category_two, sort, sorted):
|
|
574 |
],
|
575 |
}
|
576 |
|
577 |
-
events = {
|
578 |
-
|
579 |
-
}
|
580 |
|
581 |
-
value = st_echarts(options=options,
|
582 |
|
583 |
-
if value != None:
|
584 |
-
|
585 |
-
|
586 |
|
587 |
|
588 |
### create table
|
|
|
6 |
from streamlit_javascript import st_javascript
|
7 |
# from PIL import Image
|
8 |
|
9 |
+
# links_dic = {"random": "https://seaeval.github.io/",
|
10 |
+
# "meta_llama_3_8b": "https://huggingface.co/meta-llama/Meta-Llama-3-8B",
|
11 |
+
# "mistral_7b_instruct_v0_2": "https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2",
|
12 |
+
# "sailor_0_5b": "https://huggingface.co/sail/Sailor-0.5B",
|
13 |
+
# "sailor_1_8b": "https://huggingface.co/sail/Sailor-1.8B",
|
14 |
+
# "sailor_4b": "https://huggingface.co/sail/Sailor-4B",
|
15 |
+
# "sailor_7b": "https://huggingface.co/sail/Sailor-7B",
|
16 |
+
# "sailor_0_5b_chat": "https://huggingface.co/sail/Sailor-0.5B-Chat",
|
17 |
+
# "sailor_1_8b_chat": "https://huggingface.co/sail/Sailor-1.8B-Chat",
|
18 |
+
# "sailor_4b_chat": "https://huggingface.co/sail/Sailor-4B-Chat",
|
19 |
+
# "sailor_7b_chat": "https://huggingface.co/sail/Sailor-7B-Chat",
|
20 |
+
# "sea_mistral_highest_acc_inst_7b": "https://seaeval.github.io/",
|
21 |
+
# "meta_llama_3_8b_instruct": "https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct",
|
22 |
+
# "flan_t5_base": "https://huggingface.co/google/flan-t5-base",
|
23 |
+
# "flan_t5_large": "https://huggingface.co/google/flan-t5-large",
|
24 |
+
# "flan_t5_xl": "https://huggingface.co/google/flan-t5-xl",
|
25 |
+
# "flan_t5_xxl": "https://huggingface.co/google/flan-t5-xxl",
|
26 |
+
# "flan_ul2": "https://huggingface.co/google/flan-t5-ul2",
|
27 |
+
# "flan_t5_small": "https://huggingface.co/google/flan-t5-small",
|
28 |
+
# "mt0_xxl": "https://huggingface.co/bigscience/mt0-xxl",
|
29 |
+
# "seallm_7b_v2": "https://huggingface.co/SeaLLMs/SeaLLM-7B-v2",
|
30 |
+
# "gpt_35_turbo_1106": "https://openai.com/blog/chatgpt",
|
31 |
+
# "meta_llama_3_70b": "https://huggingface.co/meta-llama/Meta-Llama-3-70B",
|
32 |
+
# "meta_llama_3_70b_instruct": "https://huggingface.co/meta-llama/Meta-Llama-3-70B-Instruct",
|
33 |
+
# "sea_lion_3b": "https://huggingface.co/aisingapore/sea-lion-3b",
|
34 |
+
# "sea_lion_7b": "https://huggingface.co/aisingapore/sea-lion-7b",
|
35 |
+
# "qwen1_5_110b": "https://huggingface.co/Qwen/Qwen1.5-110B",
|
36 |
+
# "qwen1_5_110b_chat": "https://huggingface.co/Qwen/Qwen1.5-110B-Chat",
|
37 |
+
# "llama_2_7b_chat": "https://huggingface.co/meta-llama/Llama-2-7b-chat-hf",
|
38 |
+
# "gpt4_1106_preview": "https://openai.com/blog/chatgpt",
|
39 |
+
# "gemma_2b": "https://huggingface.co/google/gemma-2b",
|
40 |
+
# "gemma_7b": "https://huggingface.co/google/gemma-7b",
|
41 |
+
# "gemma_2b_it": "https://huggingface.co/google/gemma-2b-it",
|
42 |
+
# "gemma_7b_it": "https://huggingface.co/google/gemma-7b-it",
|
43 |
+
# "qwen_1_5_7b": "https://huggingface.co/Qwen/Qwen1.5-7B",
|
44 |
+
# "qwen_1_5_7b_chat": "https://huggingface.co/Qwen/Qwen1.5-7B-Chat",
|
45 |
+
# "sea_lion_7b_instruct": "https://huggingface.co/aisingapore/sea-lion-7b-instruct",
|
46 |
+
# "sea_lion_7b_instruct_research": "https://huggingface.co/aisingapore/sea-lion-7b-instruct-research",
|
47 |
+
# "LLaMA_3_Merlion_8B": "https://seaeval.github.io/",
|
48 |
+
# "LLaMA_3_Merlion_8B_v1_1": "https://seaeval.github.io/"}
|
49 |
+
|
50 |
+
# links_dic = {k.lower().replace('_', '-') : v for k, v in links_dic.items()}
|
51 |
+
|
52 |
+
# # huggingface_image = Image.open('style/huggingface.jpg')
|
53 |
+
|
54 |
+
# def nav_to(value):
|
55 |
+
# try:
|
56 |
+
# url = links_dic[str(value).lower()]
|
57 |
+
# js = f'window.open("{url}", "_blank").then(r => window.parent.location.href);'
|
58 |
+
# st_javascript(js)
|
59 |
+
# except:
|
60 |
+
# pass
|
61 |
+
|
62 |
+
# # nav_script = """
|
63 |
+
# # <meta http-equiv="refresh" content="0; url='%s'">
|
64 |
+
# # """ % (url)
|
65 |
+
# # st.write(nav_script, unsafe_allow_html=True)
|
66 |
+
|
67 |
+
# def highlight_table_line(model_name):
|
68 |
+
|
69 |
+
# st.write(model_name)
|
70 |
|
71 |
|
72 |
def draw_cross_lingual(category_one, category_two, sort, sorted):
|
|
|
85 |
|
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 |
+
st.markdown("""
|
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)
|
|
|
119 |
"xAxis": [
|
120 |
{
|
121 |
"type": "category",
|
122 |
+
"boundaryGap": True,
|
123 |
"triggerEvent": True,
|
124 |
+
"data": models,
|
125 |
}
|
126 |
],
|
127 |
"yAxis": [{"type": "value",
|
128 |
"min": min_value,
|
129 |
"max": max_value,
|
130 |
+
"boundaryGap": True
|
131 |
# "splitNumber": 10
|
132 |
}],
|
133 |
"series": [
|
|
|
184 |
],
|
185 |
}
|
186 |
|
187 |
+
# events = {
|
188 |
+
# "click": "function(params) { return params.value }",
|
189 |
+
# # "dblclick": "function(params) { return params.value }"
|
190 |
+
# }
|
191 |
|
192 |
+
value = st_echarts(options=options, height="500px") #events=events,
|
193 |
|
194 |
|
195 |
+
# if value != None:
|
196 |
+
# # print(value)
|
197 |
+
# nav_to(value)
|
198 |
|
199 |
# if value != None:
|
200 |
# highlight_table_line(value)
|
|
|
218 |
"xAxis": [
|
219 |
{
|
220 |
"type": "category",
|
221 |
+
"boundaryGap": True,
|
222 |
+
"data": models,
|
223 |
}
|
224 |
],
|
225 |
"yAxis": [{"type": "value",
|
226 |
"min": min_value,
|
227 |
"max": max_value,
|
228 |
+
"boundaryGap": True
|
229 |
# "splitNumber": 10
|
230 |
}],
|
231 |
"series": [
|
|
|
267 |
],
|
268 |
}
|
269 |
|
270 |
+
# events = {
|
271 |
+
# "click": "function(params) { return params.value }"
|
272 |
+
# }
|
273 |
|
274 |
+
value = st_echarts(options=options, height="500px")
|
275 |
|
276 |
+
# if value != None:
|
277 |
+
# # print(value)
|
278 |
+
# nav_to(value)
|
279 |
|
280 |
# if value != None:
|
281 |
# highlight_table_line(value)
|
|
|
333 |
subtitle = category_two_dict[category_two]
|
334 |
data_path = f'{folder}/{category_one}/{subtitle}.csv'
|
335 |
chart_data = pd.read_csv(data_path).round(3)
|
336 |
+
|
337 |
+
st.markdown("""
|
338 |
+
<style>
|
339 |
+
.stMultiSelect [data-baseweb=select] span{
|
340 |
+
max-width: 800px;
|
341 |
+
font-size: 0.9rem;
|
342 |
+
}
|
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
|
|
|
367 |
"xAxis": [
|
368 |
{
|
369 |
"type": "category",
|
370 |
+
"boundaryGap": True,
|
371 |
"triggerEvent": True,
|
372 |
+
"data": models,
|
373 |
}
|
374 |
],
|
375 |
"yAxis": [{"type": "value",
|
376 |
"min": min_value,
|
377 |
"max": max_value,
|
378 |
+
"boundaryGap": True
|
379 |
# "splitNumber": 10
|
380 |
}],
|
381 |
"series": [
|
|
|
388 |
],
|
389 |
}
|
390 |
|
391 |
+
# events = {
|
392 |
+
# "click": "function(params) { return params.value }"
|
393 |
+
# }
|
394 |
|
395 |
+
value = st_echarts(options=options, height="500px")
|
396 |
|
397 |
+
# if value != None:
|
398 |
+
# # print(value)
|
399 |
+
# nav_to(value)
|
400 |
|
401 |
# if value != None:
|
402 |
# highlight_table_line(value)
|
|
|
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{
|
441 |
+
max-width: 800px;
|
442 |
+
font-size: 0.9rem;
|
443 |
+
}
|
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": {
|
|
|
458 |
"xAxis": [
|
459 |
{
|
460 |
"type": "category",
|
461 |
+
"boundaryGap": True,
|
462 |
"triggerEvent": True,
|
463 |
+
"data": models,
|
464 |
}
|
465 |
],
|
466 |
"yAxis": [{"type": "value",
|
467 |
"min": min_value,
|
468 |
"max": max_value,
|
469 |
+
"boundaryGap": True
|
470 |
# "splitNumber": 10
|
471 |
}],
|
472 |
"series": [
|
|
|
479 |
],
|
480 |
}
|
481 |
|
482 |
+
# events = {
|
483 |
+
# "click": "function(params) { return params.value }"
|
484 |
+
# }
|
485 |
|
486 |
+
value = st_echarts(options=options, height="500px")
|
487 |
|
488 |
+
# if value != None:
|
489 |
+
# # print(value)
|
490 |
+
# nav_to(value)
|
491 |
|
492 |
|
493 |
### create table
|
|
|
514 |
data_path = f'{folder}/{category_one}/{subtitle}.csv'
|
515 |
chart_data = pd.read_csv(data_path).round(3)
|
516 |
|
517 |
+
st.markdown("""
|
518 |
+
<style>
|
519 |
+
.stMultiSelect [data-baseweb=select] span{
|
520 |
+
max-width: 800px;
|
521 |
+
font-size: 0.9rem;
|
522 |
+
}
|
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:
|
|
|
549 |
"xAxis": [
|
550 |
{
|
551 |
"type": "category",
|
552 |
+
"boundaryGap": True,
|
553 |
"triggerEvent": True,
|
554 |
+
"data": models,
|
555 |
}
|
556 |
],
|
557 |
"yAxis": [{"type": "value",
|
558 |
"min": min_value,
|
559 |
"max": max_value,
|
560 |
+
"boundaryGap": True
|
561 |
# "splitNumber": 10
|
562 |
}],
|
563 |
"series": [
|
|
|
599 |
"xAxis": [
|
600 |
{
|
601 |
"type": "category",
|
602 |
+
"boundaryGap": True,
|
603 |
"triggerEvent": True,
|
604 |
+
"data": models,
|
605 |
}
|
606 |
],
|
607 |
"yAxis": [{"type": "value",
|
608 |
"min": min_value,
|
609 |
"max": max_value,
|
610 |
# "splitNumber": 10
|
611 |
+
"boundaryGap": True
|
612 |
}],
|
613 |
"series": [
|
614 |
{
|
|
|
620 |
],
|
621 |
}
|
622 |
|
623 |
+
# events = {
|
624 |
+
# "click": "function(params) { return params.value }"
|
625 |
+
# }
|
626 |
|
627 |
+
value = st_echarts(options=options, height="500px")
|
628 |
|
629 |
+
# if value != None:
|
630 |
+
# # print(value)
|
631 |
+
# nav_to(value)
|
632 |
|
633 |
|
634 |
### create table
|