File size: 1,610 Bytes
0547e3e
 
 
cacf673
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0547e3e
 
cacf673
0547e3e
cacf673
 
 
 
 
 
 
 
 
 
 
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
import gradio as gr
import pandas as pd

# Simplified DataFrame for the leaderboard
data = {
    "Model": [
        "Handwritten TAG",
        "Zero-shot Text2SQL",
        "Zero-shot Text2SQL + LM Generation",
        "RAG (E5)",
        "RAG (E5) + LM Rerank"
    ],
    "Code": [
        "",  # Handwritten TAG doesn't have a code link
        "",  # Zero-shot Text2SQL doesn't have a code link
        "",  # Zero-shot Text2SQL + LM Generation doesn't have a code link
        "",  # RAG (E5) doesn't have a code link
        ""   # RAG (E5) + LM Rerank doesn't have a code link
    ],
    "Execution Accuracy": [
        "55%",  # Handwritten TAG
        "17%",  # Zero-shot Text2SQL
        "13%",  # Zero-shot Text2SQL + LM Generation
        "0%",   # RAG (E5)
        "2%"    # RAG (E5) + LM Rerank
    ]
}

leaderboard_df = pd.DataFrame(data)

# Simplified Gradio app
with gr.Blocks() as demo:
    # Header for the leaderboard
    gr.HTML(
        """
        <h1>Leaderboard - Execution Accuracy (EX)</h1>
        <style>
            #highlight-green {
                background-color: #d4edda;
                color: #155724;
                font-weight: bold;
            }
        </style>
        """
    )

    # Highlight the top row in green for "Handwritten TAG"
    with gr.Row():
        gr.Dataframe(
            value=leaderboard_df,
            headers=["Model", "Code", "Execution Accuracy"],
            datatype=["str", "str", "str"],
            row_count=(5, "dynamic"),
            wrap=True,
            elem_id="leaderboard",
            type="pandas"
        )

demo.launch()