geoalgo commited on
Commit
c708975
Β·
1 Parent(s): ac6b1a7
Files changed (1) hide show
  1. main.py +40 -0
main.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import random
2
+ from pathlib import Path
3
+
4
+ import gradio as gr
5
+ import pandas as pd
6
+ from gradio_leaderboard import Leaderboard, SelectColumns, SearchColumns
7
+
8
+ abs_path = Path(__file__).parent
9
+
10
+ df = pd.read_csv("opensci-ref-table.csv")
11
+
12
+ df.drop("#Tokens", axis=1, inplace=True)
13
+ df.drop("AVG", axis=1, inplace=True)
14
+
15
+ benchmarks = df.columns[1:]
16
+ df["Average ⬆️"] = df.loc[:, benchmarks].mean(axis=1)
17
+ # df.set_index("Model", inplace=True)
18
+
19
+ with gr.Blocks() as demo:
20
+ gr.Markdown(
21
+ """
22
+ # πŸ₯‡ OpenEuroLLM Leaderboard πŸ‡ͺπŸ‡Ί
23
+ """
24
+ )
25
+ Leaderboard(
26
+ value=df.round(2),
27
+ select_columns=SelectColumns(
28
+ default_selection=list(df.columns),
29
+ cant_deselect=["Model"],
30
+ label="Select Columns to Display:",
31
+ ),
32
+ search_columns=SearchColumns(
33
+ primary_column="Model",
34
+ label="Filter a model",
35
+ secondary_columns=[],
36
+ ),
37
+ )
38
+
39
+ if __name__ == "__main__":
40
+ demo.launch()