File size: 1,304 Bytes
d21b14f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import gradio as gr
import pandas as pd
import plotly.express as px

def display_table():
    df = pd.read_csv('benchmark_results.csv')
    return df

def create_bar_chart():
    df = pd.read_csv('benchmark_results.csv')
    fig = px.bar(df,
             x='average_score',
             y='model',
             color='average_score',
             color_continuous_scale='tealrose',
             hover_data=['armenian_language_score', 'armenian_history_score', 'mathematics_score'],
             labels={'average_score': 'Average Score', 'model': 'Model'},
             title='Average Score per Model',
             orientation='h',
             range_color=[0, 20])

    fig.update_layout(
        xaxis=dict(range=[0, 20]),
        title=dict(text='Average Score per Model', font=dict(size=16)),
        xaxis_title=dict(font=dict(size=12)),
        yaxis_title=dict(font=dict(size=12)),
        yaxis=dict(autorange="reversed"),
        hoverlabel=dict(
            bgcolor="white",  
            font_size=12,
            font_family="Arial",
            font_color="black"  
        )
    )

    return fig

with gr.Blocks() as app:
    gr.Markdown("# ArmBench Leaderboard")
    table_output = gr.DataFrame(value=display_table())
    plot_output = gr.Plot(create_bar_chart)

app.launch(share=True)