Spaces:
Sleeping
Sleeping
File size: 1,996 Bytes
e35803a 86a793b e35803a 86a793b | 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 | ---
title: UQ Competition Leaderboard
emoji: π
colorFrom: indigo
colorTo: blue
sdk: gradio
app_file: app.py
pinned: false
---
# UQ Competition Leaderboard
Students upload `submission.csv` (`id,p_correct`) + a team name; the Space grades it against
hidden labels and ranks teams by **Brier score** (lower is better). Baselines are seeded
automatically.
## Files
- `app.py` β the Gradio leaderboard
- `scoring.py` β grading + ranking logic
- `requirements.txt`
- `baselines/*.csv` β optional instructor baselines (see `make_baselines.py`)
- the hidden labels β **kept private**, see below
## Setup (recommended: public Space + private labels dataset)
1. Create a new **Gradio Space**. Add `app.py`, `scoring.py`, `requirements.txt`.
2. Put your `test_labels.csv` (`id,correct`) in a **private dataset** repo, e.g.
`your-user/uq-comp-labels`.
3. In the Space **Settings β Variables and secrets**, add:
- secret `HF_TOKEN` = a token with read access to that private dataset
- variable `LABELS_DATASET` = `your-user/uq-comp-labels`
4. (Optional) run `make_baselines.py` locally and add the resulting `baselines/` folder to the Space.
5. Share the Space URL with students.
The labels live in a private dataset the Space reads with its token, so students using the
public Space can never see them.
### Simpler alternative (private Space)
Make the Space **private** and upload `test_labels.csv` directly into it (no dataset/secret
needed β the app falls back to reading the local file). Only people you invite can use it.
## Notes
- Submissions are stored in `submissions.csv`; each team keeps its **best** (lowest Brier) row.
- That file resets if the Space rebuilds. For a single workshop session that's fine; for
durability enable **persistent storage** on the Space, or have students keep their CSVs.
- Baselines (`π€ constant`, `π€ random`, `π€ perfect`, plus any `baselines/*.csv`) are recomputed
on every refresh and are not part of the saved submissions.
|