File size: 2,259 Bytes
a0497a5
 
 
 
b8e8c93
82d6c9a
b8e8c93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a0497a5
 
82d6c9a
 
 
 
 
 
 
a0497a5
 
 
82d6c9a
 
 
 
 
 
 
b8e8c93
a0497a5
 
 
 
 
 
 
 
b8e8c93
a0497a5
 
 
 
 
 
 
 
b8e8c93
a0497a5
 
 
 
 
 
 
b8e8c93
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import gradio as gr
import pandas as pd

block = gr.Blocks()
NUM_DATASETS = 7
NUM_SCORES = 0
NUM_MODELS = 5

def general_dataframe_update():
    """
    Returns general dataframe for general table. 
    """
    dataframe = pd.read_csv('data/general.csv')
    return dataframe

def classification_dataframe_update():
    """
    Returns classification dataframe for classification table. 
    """
    dataframe = pd.read_csv('data/classification.csv')
    return dataframe
def sts_dataframe_udpate():
    """
    Returns sts dataframe for sts table. 
    """
    dataframe = pd.read_csv('data/sts.csv')
    return dataframe

with block:
    gr.Markdown(f"""**Leaderboard de modelos de Embeddings en español
    Massive Text Embedding Benchmark (MTEB) Leaderboard.**
    - **Total Datasets**: {NUM_DATASETS}
    - **Total Languages**: 1
    - **Total Scores**: {NUM_SCORES}
    - **Total Models**: {NUM_MODELS}
    """)
    with gr.Tabs():
        with gr.TabItem("Overall"):
            with gr.Row():
                    gr.Markdown("""
                    **Tabla General de Embeddings**
                    
                    - **Metricas:** Varias, con sus respectivas medias.
                    - **Idioma:** Español
                    """)
            with gr.Row():
                overall = general_dataframe_update()
                data_overall = gr.components.Dataframe(
                        overall,
                        type="pandas",
                        wrap=True,
                    )
        with gr.TabItem("Classification"):
            with gr.Row():
                # Create and display a sample DataFrame
                classification = classification_dataframe_update()
                data_overall = gr.components.Dataframe(
                        classification,
                        type="pandas",
                        wrap=True,
                    )
        with gr.TabItem("STS"):
            with gr.Row():
                # Create and display a sample DataFrame
                sts = sts_dataframe_udpate()
                data_overall = gr.components.Dataframe(
                        sts,
                        type="pandas",
                        wrap=True,
                    )

block.launch()