Prototype
Browse files- app.py +55 -0
- passk.csv +45 -0
- requirements.txt +2 -0
app.py
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import pandas as pd
|
3 |
+
import numpy as np
|
4 |
+
|
5 |
+
# Read the CSV file
|
6 |
+
df = pd.read_csv('passk.csv')
|
7 |
+
|
8 |
+
# Extract unique languages and models from the Dataset column
|
9 |
+
languages = sorted(set([d.split('-')[1] for d in df['Dataset']]))
|
10 |
+
models = sorted(set(['-'.join(d.split('-')[2:-2]) for d in df['Dataset']]))
|
11 |
+
|
12 |
+
# Create a dictionary to map models to friendly names
|
13 |
+
model_to_friendly = {
|
14 |
+
"starcoder2_15b": "StarCoder2-15B",
|
15 |
+
"deepseekcoder_v2lite": "DeepSeekCoder2-Lite"
|
16 |
+
}
|
17 |
+
|
18 |
+
# Function to get friendly name or original name if not in the dictionary
|
19 |
+
def get_friendly_name(model):
|
20 |
+
return model_to_friendly.get(model, model)
|
21 |
+
|
22 |
+
# Create a pivot table
|
23 |
+
pivot = df.pivot(index='Dataset', columns='Dataset', values='Estimate')
|
24 |
+
pivot.index = ['-'.join(i.split('-')[2:-2]) for i in pivot.index]
|
25 |
+
pivot.columns = [i.split('-')[1] for i in pivot.columns]
|
26 |
+
|
27 |
+
# Function to update the table based on selected languages
|
28 |
+
def update_table(selected_languages):
|
29 |
+
if not selected_languages:
|
30 |
+
return np.full((len(models), len(languages)), "-").tolist()
|
31 |
+
|
32 |
+
display_data = pivot[selected_languages].replace(np.nan, "-")
|
33 |
+
display_data = display_data.applymap(lambda x: f"{x:.3f}" if isinstance(x, (int, float)) else x)
|
34 |
+
display_data.index = [get_friendly_name(model) for model in display_data.index]
|
35 |
+
return display_data.values.tolist()
|
36 |
+
|
37 |
+
# Create the Gradio interface
|
38 |
+
with gr.Blocks() as app:
|
39 |
+
gr.Markdown("# Model Leaderboard")
|
40 |
+
|
41 |
+
with gr.Row():
|
42 |
+
language_checkboxes = gr.CheckboxGroup(choices=languages, label="Select Languages", value=languages)
|
43 |
+
|
44 |
+
table = gr.Dataframe(
|
45 |
+
headers=[lang.capitalize() for lang in languages],
|
46 |
+
row_headers=[get_friendly_name(model) for model in models],
|
47 |
+
col_count=(lambda: len(languages)),
|
48 |
+
interactive=False
|
49 |
+
)
|
50 |
+
|
51 |
+
language_checkboxes.change(update_table, inputs=[language_checkboxes], outputs=[table])
|
52 |
+
|
53 |
+
# Launch the app
|
54 |
+
if __name__ == "__main__":
|
55 |
+
app.launch()
|
passk.csv
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Dataset,Pass@k,Estimate,NumProblems,MinCompletions,MaxCompletions
|
2 |
+
humaneval-clj-deepseekcoder_v2lite_base-0.2-reworded,1,0.16,161,50,50
|
3 |
+
humaneval-clj-starcoder2_15b-0.2-reworded,1,0.16,161,50,50
|
4 |
+
humaneval-cpp-deepseekcoder_v2lite_base-0.2-reworded,1,0.46,161,50,50
|
5 |
+
humaneval-cpp-starcoder2_15b-0.2-reworded,1,0.47,161,50,50
|
6 |
+
humaneval-cs-deepseekcoder_v2lite_base-0.2-reworded,1,0.23,158,50,50
|
7 |
+
humaneval-cs-starcoder2_15b-0.2-reworded,1,0.32,158,50,50
|
8 |
+
humaneval-d-deepseekcoder_v2lite_base-0.2-reworded,1,0.16,156,50,50
|
9 |
+
humaneval-d-starcoder2_15b-0.2-reworded,1,0.25,156,50,50
|
10 |
+
humaneval-elixir-deepseekcoder_v2lite_base-0.2-reworded,1,0.28,161,50,50
|
11 |
+
humaneval-elixir-starcoder2_15b-0.2-reworded,1,0.08,161,50,50
|
12 |
+
humaneval-go-deepseekcoder_v2lite_base-0.2-reworded,1,0.28,154,50,50
|
13 |
+
humaneval-go-starcoder2_15b-0.2-reworded,1,0.26,154,50,50
|
14 |
+
humaneval-hs-deepseekcoder_v2lite_base-0.2-reworded,1,0.20,156,50,50
|
15 |
+
humaneval-hs-starcoder2_15b-0.2-reworded,1,0.17,156,50,50
|
16 |
+
humaneval-java-deepseekcoder_v2lite_base-0.2-reworded,1,0.36,158,50,50
|
17 |
+
humaneval-java-starcoder2_15b-0.2-reworded,1,0.40,158,50,50
|
18 |
+
humaneval-jl-deepseekcoder_v2lite_base-0.2-reworded,1,0.33,159,50,50
|
19 |
+
humaneval-jl-starcoder2_15b-0.2-reworded,1,0.32,159,50,50
|
20 |
+
humaneval-js-deepseekcoder_v2lite_base-0.2-reworded,1,0.45,161,50,50
|
21 |
+
humaneval-js-starcoder2_15b-0.2-reworded,1,0.45,161,50,50
|
22 |
+
humaneval-lua-deepseekcoder_v2lite_base-0.2-reworded,1,0.38,161,50,50
|
23 |
+
humaneval-lua-starcoder2_15b-0.2-reworded,1,0.44,161,50,50
|
24 |
+
humaneval-ml-deepseekcoder_v2lite_base-0.2-reworded,1,0.17,155,50,50
|
25 |
+
humaneval-ml-starcoder2_15b-0.2-reworded,1,0.24,155,50,50
|
26 |
+
humaneval-php-deepseekcoder_v2lite_base-0.2-reworded,1,0.43,161,50,50
|
27 |
+
humaneval-php-starcoder2_15b-0.2-reworded,1,0.34,161,50,50
|
28 |
+
humaneval-pl-deepseekcoder_v2lite_base-0.2-reworded,1,0.37,161,50,50
|
29 |
+
humaneval-pl-starcoder2_15b-0.2-reworded,1,0.38,161,50,50
|
30 |
+
humaneval-rb-deepseekcoder_v2lite_base-0.2-reworded,1,0.40,161,50,50
|
31 |
+
humaneval-rb-starcoder2_15b-0.2-reworded,1,0.42,161,50,50
|
32 |
+
humaneval-r-deepseekcoder_v2lite_base-0.2-reworded,1,0.31,161,50,50
|
33 |
+
humaneval-rkt-deepseekcoder_v2lite_base-0.2-reworded,1,0.22,161,50,50
|
34 |
+
humaneval-rkt-starcoder2_15b-0.2-reworded,1,0.26,161,50,50
|
35 |
+
humaneval-rs-deepseekcoder_v2lite_base-0.2-reworded,1,0.38,156,50,50
|
36 |
+
humaneval-rs-starcoder2_15b-0.2-reworded,1,0.39,156,50,50
|
37 |
+
humaneval-r-starcoder2_15b-0.2-reworded,1,0.25,161,50,50
|
38 |
+
humaneval-scala-deepseekcoder_v2lite_base-0.2-reworded,1,0.39,160,50,50
|
39 |
+
humaneval-scala-starcoder2_15b-0.2-reworded,1,0.41,160,50,50
|
40 |
+
humaneval-sh-deepseekcoder_v2lite_base-0.2-reworded,1,0.19,158,50,50
|
41 |
+
humaneval-sh-starcoder2_15b-0.2-reworded,1,0.19,158,50,50
|
42 |
+
humaneval-swift-deepseekcoder_v2lite_base-0.2-reworded,1,0.36,158,50,50
|
43 |
+
humaneval-swift-starcoder2_15b-0.2-reworded,1,0.34,158,50,50
|
44 |
+
humaneval-ts-deepseekcoder_v2lite_base-0.2-reworded,1,0.47,159,50,50
|
45 |
+
humaneval-ts-starcoder2_15b-0.2-reworded,1,0.43,159,50,50
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
pandas
|
2 |
+
numpy
|