felix
commited on
Commit
·
84f536a
1
Parent(s):
7411847
update
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import glob
|
|
4 |
import os
|
5 |
from datetime import datetime
|
6 |
|
7 |
-
st.set_page_config(layout="wide")
|
8 |
st.title('Meta Open LLM leaderboard')
|
9 |
|
10 |
data_path = './data/20230820_0354/'
|
@@ -16,10 +16,39 @@ parsed_date = datetime.strptime(date_str, "%Y%m%d_%H%M")
|
|
16 |
# Formatting the parsed date
|
17 |
formatted_date = parsed_date.strftime("%b %d, %Y %H:%M")
|
18 |
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
imgs = glob.glob(os.path.join(data_path, '*.png'))
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
cols = st.columns(2)
|
23 |
|
24 |
-
for i, img in enumerate(
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
import os
|
5 |
from datetime import datetime
|
6 |
|
7 |
+
#st.set_page_config(layout="wide")
|
8 |
st.title('Meta Open LLM leaderboard')
|
9 |
|
10 |
data_path = './data/20230820_0354/'
|
|
|
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: " + formatted_date)
|
28 |
+
st.divider()
|
29 |
+
|
30 |
imgs = glob.glob(os.path.join(data_path, '*.png'))
|
31 |
|
32 |
+
# Extracting images that start with "hf_llm_diagram"
|
33 |
+
hf_llm_diagrams = [img for img in imgs if 'hf_llm_diagram' in os.path.basename(img)]
|
34 |
+
|
35 |
+
# Getting the remaining images
|
36 |
+
remaining_imgs = [img for img in imgs if 'hf_llm_diagram' not in os.path.basename(img)]
|
37 |
+
|
38 |
+
st.write("HuggingFace Open LLM leaderboard by Model Size")
|
39 |
+
st.image(hf_llm_diagrams,use_column_width="auto")
|
40 |
+
|
41 |
+
st.divider()
|
42 |
+
st.write("HuggingFace and Other Leaderboards: A Comparative Model Evaluation")
|
43 |
+
st.caption("Only models evaluated on both leaderboards are included.")
|
44 |
cols = st.columns(2)
|
45 |
|
46 |
+
for i, img in enumerate(remaining_imgs):
|
47 |
+
# Extract the filename from the full image path
|
48 |
+
filename = os.path.basename(img)
|
49 |
+
|
50 |
+
# Get the caption from the captions_map dictionary
|
51 |
+
caption = captions_map.get(filename, "") # If no caption is found, it will default to an empty string
|
52 |
+
|
53 |
+
# Display the image with the caption
|
54 |
+
cols[i % 2].image(img, caption=caption, width=None)
|