Spaces:
Running
Running
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -63,6 +63,10 @@ MODALITIES = [
|
|
| 63 |
# Space in ../slm-judge instead), plus their samples.json records and about.json
|
| 64 |
# panels — render_about skips panels whose tab isn't listed above.
|
| 65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
# Curated audio samples (optional): a samples.json manifest next to the board
|
| 67 |
# JSONs, each record {modality, factor, label?, group?, model?, text?,
|
| 68 |
# transcript?, audio} where "audio" is a repo-relative path (e.g.
|
|
@@ -206,10 +210,11 @@ def _data_path(data_name: str) -> Path:
|
|
| 206 |
|
| 207 |
|
| 208 |
def load_boards(data_name: str) -> list:
|
| 209 |
-
"""The full list of boards in a modality's data file
|
| 210 |
-
(legacy shape) is wrapped so callers always get a list."""
|
| 211 |
data = json.loads(_data_path(data_name).read_text())
|
| 212 |
-
|
|
|
|
| 213 |
|
| 214 |
|
| 215 |
def load_samples() -> list:
|
|
|
|
| 63 |
# Space in ../slm-judge instead), plus their samples.json records and about.json
|
| 64 |
# panels — render_about skips panels whose tab isn't listed above.
|
| 65 |
|
| 66 |
+
# Board ids kept in the data files but not rendered as columns (the SLM Judge
|
| 67 |
+
# sibling hides its "Overall" mean column this way; nothing is hidden here).
|
| 68 |
+
HIDDEN_BOARDS: frozenset = frozenset()
|
| 69 |
+
|
| 70 |
# Curated audio samples (optional): a samples.json manifest next to the board
|
| 71 |
# JSONs, each record {modality, factor, label?, group?, model?, text?,
|
| 72 |
# transcript?, audio} where "audio" is a repo-relative path (e.g.
|
|
|
|
| 210 |
|
| 211 |
|
| 212 |
def load_boards(data_name: str) -> list:
|
| 213 |
+
"""The full list of boards in a modality's data file, minus any HIDDEN_BOARDS.
|
| 214 |
+
A single-object file (legacy shape) is wrapped so callers always get a list."""
|
| 215 |
data = json.loads(_data_path(data_name).read_text())
|
| 216 |
+
boards = data if isinstance(data, list) else [data]
|
| 217 |
+
return [b for b in boards if b.get("id") not in HIDDEN_BOARDS]
|
| 218 |
|
| 219 |
|
| 220 |
def load_samples() -> list:
|