Spaces:
Sleeping
Sleeping
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() | |