still trying to make the leaderboard
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ import pandas as pd
|
|
| 7 |
|
| 8 |
import gradio as gr
|
| 9 |
from datasets import load_dataset
|
| 10 |
-
from huggingface_hub import upload_file, hf_hub_download
|
| 11 |
from gradio_leaderboard import ColumnFilter, Leaderboard, SelectColumns
|
| 12 |
from evaluation import evaluate_problem
|
| 13 |
from datetime import datetime
|
|
@@ -33,13 +33,12 @@ def make_clickable(name):
|
|
| 33 |
link =f'https://huggingface.co/{name}'
|
| 34 |
return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{name}</a>'
|
| 35 |
|
| 36 |
-
|
| 37 |
def get_leaderboard():
|
| 38 |
ds = load_dataset(results_repo, split='train')
|
| 39 |
df = pd.DataFrame(ds)
|
| 40 |
|
| 41 |
df.rename(columns={'submission_time': 'submission time', 'problem_type': 'problem type'}, inplace=True)
|
| 42 |
-
df['user'] = df['user'].apply(lambda x: make_clickable(x)).astype(str)
|
| 43 |
score_field = "score" if "score" in df.columns else "objective" # fallback
|
| 44 |
|
| 45 |
df = df.sort_values(by=score_field, ascending=True)
|
|
@@ -73,6 +72,9 @@ def gradio_interface() -> gr.Blocks:
|
|
| 73 |
"""
|
| 74 |
)
|
| 75 |
|
|
|
|
|
|
|
|
|
|
| 76 |
with gr.TabItem("Submit", elem_id="boundary-benchmark-tab-table"):
|
| 77 |
gr.Markdown(
|
| 78 |
"""
|
|
|
|
| 7 |
|
| 8 |
import gradio as gr
|
| 9 |
from datasets import load_dataset
|
| 10 |
+
from huggingface_hub import upload_file, hf_hub_download, list_files_info
|
| 11 |
from gradio_leaderboard import ColumnFilter, Leaderboard, SelectColumns
|
| 12 |
from evaluation import evaluate_problem
|
| 13 |
from datetime import datetime
|
|
|
|
| 33 |
link =f'https://huggingface.co/{name}'
|
| 34 |
return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{name}</a>'
|
| 35 |
|
|
|
|
| 36 |
def get_leaderboard():
|
| 37 |
ds = load_dataset(results_repo, split='train')
|
| 38 |
df = pd.DataFrame(ds)
|
| 39 |
|
| 40 |
df.rename(columns={'submission_time': 'submission time', 'problem_type': 'problem type'}, inplace=True)
|
| 41 |
+
# df['user'] = df['user'].apply(lambda x: make_clickable(x)).astype(str)
|
| 42 |
score_field = "score" if "score" in df.columns else "objective" # fallback
|
| 43 |
|
| 44 |
df = df.sort_values(by=score_field, ascending=True)
|
|
|
|
| 72 |
"""
|
| 73 |
)
|
| 74 |
|
| 75 |
+
# dropdown = gr.Dropdown(choices=filenames, label="Choose a file")
|
| 76 |
+
# plot_output = gr.Plot()
|
| 77 |
+
|
| 78 |
with gr.TabItem("Submit", elem_id="boundary-benchmark-tab-table"):
|
| 79 |
gr.Markdown(
|
| 80 |
"""
|