felix commited on
Commit
9a34cda
1 Parent(s): 2fc3e78
README.md CHANGED
@@ -11,3 +11,6 @@ license: apache-2.0
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
14
+
15
+ TODO:
16
+ - Add more links to various leaderboards
app.py CHANGED
@@ -7,26 +7,36 @@ from datetime import datetime
7
  #st.set_page_config(layout="wide")
8
  st.title('Meta Open LLM leaderboard')
9
 
10
- data_path = './data/20230820_0354/'
11
 
12
- # Extracting date and time information from the path
13
- date_str = data_path.split('/')[-2]
14
- parsed_date = datetime.strptime(date_str, "%Y%m%d_%H%M")
15
 
16
- # Formatting the parsed date
17
- formatted_date = parsed_date.strftime("%b %d, %Y %H:%M")
 
 
 
 
 
 
 
 
 
 
18
 
19
  captions_map = {
20
  "hg_average_to_agentbench_compare.png": "HF to AgentBench compare",
21
- "hg_average_to_opencompass_compare.png": "HF to OpenCompass compare",
22
  "hg_average_to_mt_bench_compare.png": "HF to MT-Bench compare",
23
  "hg_average_to_mosaic_compare.png": "HF to MosaicML compare",
24
  "hg_average_to_alpacaeval_compare.png": "HF to AlpacaEval compare"
25
  }
26
 
27
- st.write("Generated on: <b>" + formatted_date + "</b>", unsafe_allow_html=True)
28
  st.divider()
29
 
 
 
30
  imgs = glob.glob(os.path.join(data_path, '*.png'))
31
 
32
  # Extracting images that start with "hf_llm_diagram"
@@ -53,6 +63,16 @@ for i, img in enumerate(remaining_imgs):
53
  # Display the image with the caption
54
  cols[i % 2].image(img, caption=caption, width=None)
55
 
 
 
 
 
 
 
 
 
 
 
56
  st.divider()
57
  st.subheader('About')
58
  st.write('This meta leaderboard is built and maintained by Felix Zaslavskiy. For feedback, correction, suggestions please reach out on X at <a href="https://twitter.com/FZaslavskiy" >@FZaslavskiy</a> or here via community discussions.', unsafe_allow_html=True)
 
7
  #st.set_page_config(layout="wide")
8
  st.title('Meta Open LLM leaderboard')
9
 
10
+ directories = os.listdir("./data")
11
 
12
+ #data_dir = directories[0]
 
 
13
 
14
+ def format_dir_date(data_dir):
15
+ # Extracting date and time information from the path
16
+ parsed_date = datetime.strptime(data_dir, "%Y%m%d_%H%M")
17
+
18
+ # Formatting the parsed date
19
+ return parsed_date.strftime("%b %d, %Y %H:%M")
20
+
21
+ data_dir = st.selectbox(
22
+ 'Select different Date',
23
+ directories,
24
+ format_func=format_dir_date
25
+ )
26
 
27
  captions_map = {
28
  "hg_average_to_agentbench_compare.png": "HF to AgentBench compare",
29
+ "hg_average_to_opencompass_compare.png": "HF to OpenCompass</a> compare",
30
  "hg_average_to_mt_bench_compare.png": "HF to MT-Bench compare",
31
  "hg_average_to_mosaic_compare.png": "HF to MosaicML compare",
32
  "hg_average_to_alpacaeval_compare.png": "HF to AlpacaEval compare"
33
  }
34
 
35
+ st.write("Generated on: <b>" + format_dir_date(data_dir) + "</b>", unsafe_allow_html=True)
36
  st.divider()
37
 
38
+ data_path = './data/' + data_dir
39
+
40
  imgs = glob.glob(os.path.join(data_path, '*.png'))
41
 
42
  # Extracting images that start with "hf_llm_diagram"
 
63
  # Display the image with the caption
64
  cols[i % 2].image(img, caption=caption, width=None)
65
 
66
+ st.write(
67
+ """
68
+ <ul><li>
69
+ <a href="https://opencompass.org.cn/leaderboard-llm">OpenCompass</a>
70
+ </li>
71
+ <li><a href="https://huggingface.co/spaces/lmsys/chatbot-arena-leaderboard">MT-Bench</a></li>
72
+
73
+ </ul>
74
+ """, unsafe_allow_html=True
75
+ )
76
  st.divider()
77
  st.subheader('About')
78
  st.write('This meta leaderboard is built and maintained by Felix Zaslavskiy. For feedback, correction, suggestions please reach out on X at <a href="https://twitter.com/FZaslavskiy" >@FZaslavskiy</a> or here via community discussions.', unsafe_allow_html=True)
data/20230823_0545/hf_llm_diagramv2.png ADDED
data/20230823_0545/hg_average_to_agentbench_compare.png ADDED
data/20230823_0545/hg_average_to_alpacaeval_compare.png ADDED
data/20230823_0545/hg_average_to_mosaic_compare.png ADDED
data/20230823_0545/hg_average_to_mt_bench_compare.png ADDED
data/20230823_0545/hg_average_to_opencompass_compare.png ADDED