Spaces:
Runtime error
Runtime error
feat<fancy>: leaderboard
Browse files
app.py
CHANGED
|
@@ -7,6 +7,9 @@ import gradio as gr
|
|
| 7 |
import pandas as pd
|
| 8 |
from huggingface_hub import snapshot_download, upload_file
|
| 9 |
|
|
|
|
|
|
|
|
|
|
| 10 |
# 프로젝트 구조에 맞춰 import (src.*)
|
| 11 |
from src.envs import RESULTS_REPO, EVAL_RESULTS_PATH
|
| 12 |
from src.grader import grade # grade(submission_df, team_id) -> (score_df, report_dir)
|
|
@@ -172,12 +175,13 @@ with gr.Blocks() as demo:
|
|
| 172 |
|
| 173 |
|
| 174 |
with gr.Tab("리더보드"):
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
|
|
|
| 181 |
with gr.Row():
|
| 182 |
refresh_btn = gr.Button("리더보드 새로고침 (Hub 동기화)")
|
| 183 |
|
|
|
|
| 7 |
import pandas as pd
|
| 8 |
from huggingface_hub import snapshot_download, upload_file
|
| 9 |
|
| 10 |
+
from gradio_leaderboard import Leaderboard
|
| 11 |
+
|
| 12 |
+
|
| 13 |
# 프로젝트 구조에 맞춰 import (src.*)
|
| 14 |
from src.envs import RESULTS_REPO, EVAL_RESULTS_PATH
|
| 15 |
from src.grader import grade # grade(submission_df, team_id) -> (score_df, report_dir)
|
|
|
|
| 175 |
|
| 176 |
|
| 177 |
with gr.Tab("리더보드"):
|
| 178 |
+
leaderboard_table = Leaderboard(
|
| 179 |
+
value=history_state.rename(columns={"TOTAL": "TOTAL ⬆️"}),
|
| 180 |
+
search_columns=["TEAM", "RMSE_AC", "RMSE_AC_SCALED", "NMAE_RANGE", "NMAE_MEAN", "TOTAL ⬆️"],
|
| 181 |
+
hide_columns=[], # 숨길 게 있으면 여기에 추가
|
| 182 |
+
filter_columns=["TEAM"],
|
| 183 |
+
label="Leaderboard",
|
| 184 |
+
)
|
| 185 |
with gr.Row():
|
| 186 |
refresh_btn = gr.Button("리더보드 새로고침 (Hub 동기화)")
|
| 187 |
|