zhuohan-7 commited on
Commit
c7050d3
·
verified ·
1 Parent(s): 64484e2

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app/draw_diagram.py +48 -13
app/draw_diagram.py CHANGED
@@ -6,17 +6,52 @@ from streamlit_echarts import st_echarts
6
  from streamlit_javascript import st_javascript
7
  # from PIL import Image
8
 
9
- links_dic = {
10
- "Meta-Llama-3-8B-Instruct": 'https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct',
11
- "Meta-Llama-3-70B-Instruct": 'https://huggingface.co/meta-llama/Meta-Llama-3-70B-Instruct',
12
- "Meta-Llama-3-8B": "https://huggingface.co/meta-llama/Meta-Llama-3-8B"
13
- }
14
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  # huggingface_image = Image.open('style/huggingface.jpg')
17
 
18
- def nav_to(url):
19
- # print(url)
20
  js = f'window.open("{url}", "_blank").then(r => window.parent.location.href);'
21
  st_javascript(js)
22
 
@@ -144,7 +179,7 @@ def draw_cross_lingual(category_one, category_two, sort, sorted):
144
 
145
  if value != None:
146
  # print(value)
147
- nav_to(links_dic[value])
148
 
149
  # if value != None:
150
  # highlight_table_line(value)
@@ -224,7 +259,7 @@ def draw_cross_lingual(category_one, category_two, sort, sorted):
224
 
225
  if value != None:
226
  # print(value)
227
- nav_to(links_dic[value])
228
 
229
  # if value != None:
230
  # highlight_table_line(value)
@@ -331,7 +366,7 @@ def draw_only_acc(folder_name, category_one, category_two, sorted):
331
 
332
  if value != None:
333
  # print(value)
334
- nav_to(links_dic[value])
335
 
336
  # if value != None:
337
  # highlight_table_line(value)
@@ -411,7 +446,7 @@ def draw_flores_translation(category_one, category_two, sorted):
411
 
412
  if value != None:
413
  # print(value)
414
- nav_to(links_dic[value])
415
 
416
 
417
  ### create table
@@ -540,7 +575,7 @@ def draw_dialogue(category_one, category_two, sort, sorted):
540
 
541
  if value != None:
542
  # print(value)
543
- nav_to(links_dic[value])
544
 
545
 
546
  ### 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
+ links_dic = {k.lower() : v for k, v in links_dic.items()}
50
 
51
  # huggingface_image = Image.open('style/huggingface.jpg')
52
 
53
+ def nav_to(value):
54
+ url = links_dic[str(value).lower()]
55
  js = f'window.open("{url}", "_blank").then(r => window.parent.location.href);'
56
  st_javascript(js)
57
 
 
179
 
180
  if value != None:
181
  # print(value)
182
+ nav_to(value)
183
 
184
  # if value != None:
185
  # highlight_table_line(value)
 
259
 
260
  if value != None:
261
  # print(value)
262
+ nav_to(value)
263
 
264
  # if value != None:
265
  # highlight_table_line(value)
 
366
 
367
  if value != None:
368
  # print(value)
369
+ nav_to(value)
370
 
371
  # if value != None:
372
  # highlight_table_line(value)
 
446
 
447
  if value != None:
448
  # print(value)
449
+ nav_to(value)
450
 
451
 
452
  ### create table
 
575
 
576
  if value != None:
577
  # print(value)
578
+ nav_to(value)
579
 
580
 
581
  ### create table