Michael Rabinovich commited on
Commit
b5ad973
·
1 Parent(s): 628bc9e

refactor: split leaderboard read path into its own module

Browse files

Mirrors the shape adyen/DABstep uses on their reference Space (UI
assembly in app.py, business logic in a sibling module). app.py drops
from 224 lines to 158 by extracting the env-driven repo constants,
the LOCAL_RESULTS_PATH + LEADERBOARD_COLS schema, the Hub/local row
loaders, and load_leaderboard() into leaderboard.py. The submit
handler stays in app.py for now; it'll move to a third module
(submit.py) when Step 6 (E) lands the real validation + async eval.

No behaviour change: load_leaderboard is imported back into app.py
and wired into the same gr.Dataframe / refresh button pair as before.
Smoke-tested locally (cadgenbench-space env): app module imports
cleanly, load_leaderboard() returns a dataframe with the expected
columns.

2 files changed +99 -85
Files changed (2)
app.py+8-85
leaderboard.pyAdded+91