File size: 748 Bytes
cd863f2 a991678 cd863f2 066d746 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
import gradio as gr
import pandas as pd
import plotly.express as px
DATA = {"BBH": [0.2, 0.7], "GPQA": [0.4, 0.5], "IFEval": [0.6, 0.3], "MATH": [0.2, 0.7], "MMLU-Pro": [0.4, 0.5], "MuSR": [0.6, 0.3]}
def display_plot():
df = pd.DataFrame(DATA, index=["model-1", "model-2"])
fig = px.line_polar(
df.melt(ignore_index=False, var_name="Benchmark", value_name="Score").reset_index(names="Model"),
r="Score", theta="Benchmark", color="Model",
line_close=True,
range_r=[0, 1],
color_discrete_sequence=["#FF9D00", "#32343D"],
)
return fig
with gr.Blocks() as demo:
plot = gr.Plot()
btn = gr.Button()
btn.click(
fn=display_plot,
outputs=plot,
)
demo.launch()
|