rashisht commited on
Commit
d828a91
·
verified ·
1 Parent(s): 2aa5f0f

Retire Voice Controllability tab; ASR tab rename; About card filtering

Browse files
Files changed (1) hide show
  1. app.py +13 -5
app.py CHANGED
@@ -1,5 +1,5 @@
1
  """Real World VoiceEQ Benchmark — Gradio Space (Text-to-Speech / Speech-to-Speech /
2
- Voice Controllability / Speech Understanding / ASR / SLM Judge).
3
 
4
  One Space: an About tab (about.json prose + one clickable card per panel that
5
  jumps to its tab), then one tab per modality (plus the SLM Judge
@@ -54,12 +54,15 @@ DATASET_REPO = os.environ.get("LEADERBOARD_DATASET", "").strip()
54
  # use in their "modality" field.
55
  MODALITIES = [
56
  ("Text-to-Speech", "tts", "tts_leaderboard.json"),
57
- ("Voice Controllability", "voice_creation", "voice_creation_leaderboard.json"),
58
  ("Speech-to-Speech", "sts", "sts_leaderboard.json"),
59
  ("Speech Understanding", "stt", "stt_leaderboard.json"),
60
  ("ASR", "asr", "asr_leaderboard.json"),
61
  ("SLM Judge", "slm_judge", "slm_judge_leaderboard.json"),
62
  ]
 
 
 
 
63
 
64
  # Curated audio samples (optional): a samples.json manifest next to the board
65
  # JSONs, each record {modality, factor, label?, group?, model?, text?,
@@ -253,7 +256,7 @@ def merge_boards(boards: list) -> dict:
253
  Every other board contributes one factor column keyed by its id, whose value
254
  is that board's `score` for the model. The participant roster is shared, so a
255
  model's row gathers its score from each board. A file with no Overall board
256
- (single-factor modalities, e.g. Voice Controllability) treats every board as a
257
  factor board; license/size then come from the factor boards' participants."""
258
  if not boards:
259
  return {"title": "", "description": "", "keyMetric": {},
@@ -335,12 +338,17 @@ def load_about() -> dict:
335
 
336
  def render_about(about: dict) -> str:
337
  """The About tab: intro paragraphs, one clickable card per leaderboard
338
- panel (title + description, click = jump to that tab), outro."""
 
 
 
339
  parts = ["<div class='ttslb abt'>"]
340
  for p in about.get("intro", []):
341
  parts.append(f"<p class='abt-p'>{html.escape(p)}</p>")
342
  cards = []
343
  for panel in about.get("panels", []):
 
 
344
  body = "".join(f"<p>{html.escape(q)}</p>" for q in panel.get("paragraphs", []))
345
  cards.append(
346
  f"<div class='abt-card' role='button' tabindex='0' "
@@ -953,7 +961,7 @@ def render_samples_section(samples: list, factor_labels: dict,
953
  curated multi-turn contrasts), rendered below the board
954
  table: one category tab per factor (first-seen manifest order, switching in
955
  APP_JS), each a list of label + audio player rows. A single-category
956
- modality (e.g. Voice Controllability) gets no tab row — just the rows. A sample's
957
  "text" (generation prompt) and "model" attribution are kept in the manifest
958
  but not displayed; a "transcript" (the human reference for ASR golden
959
  samples) is rendered next to the player. Rows carrying a "group" cluster
 
1
  """Real World VoiceEQ Benchmark — Gradio Space (Text-to-Speech / Speech-to-Speech /
2
+ Speech Understanding / ASR / SLM Judge).
3
 
4
  One Space: an About tab (about.json prose + one clickable card per panel that
5
  jumps to its tab), then one tab per modality (plus the SLM Judge
 
54
  # use in their "modality" field.
55
  MODALITIES = [
56
  ("Text-to-Speech", "tts", "tts_leaderboard.json"),
 
57
  ("Speech-to-Speech", "sts", "sts_leaderboard.json"),
58
  ("Speech Understanding", "stt", "stt_leaderboard.json"),
59
  ("ASR", "asr", "asr_leaderboard.json"),
60
  ("SLM Judge", "slm_judge", "slm_judge_leaderboard.json"),
61
  ]
62
+ # Data that exists but is deliberately not rendered (kept in the dataset):
63
+ # voice_creation_leaderboard.json (the old "Voice Controllability" tab), its
64
+ # samples.json records (modality "voice_creation"), and its about.json panel —
65
+ # render_about skips panels whose tab isn't listed above.
66
 
67
  # Curated audio samples (optional): a samples.json manifest next to the board
68
  # JSONs, each record {modality, factor, label?, group?, model?, text?,
 
256
  Every other board contributes one factor column keyed by its id, whose value
257
  is that board's `score` for the model. The participant roster is shared, so a
258
  model's row gathers its score from each board. A file with no Overall board
259
+ (a single-factor file) treats every board as a
260
  factor board; license/size then come from the factor boards' participants."""
261
  if not boards:
262
  return {"title": "", "description": "", "keyMetric": {},
 
338
 
339
  def render_about(about: dict) -> str:
340
  """The About tab: intro paragraphs, one clickable card per leaderboard
341
+ panel (title + description, click = jump to that tab), outro. Panels whose
342
+ tab isn't currently in MODALITIES (e.g. Voice Controllability while its
343
+ tab is retired) are kept in the data but not rendered."""
344
+ tabs = {label for label, _key, _fname in MODALITIES}
345
  parts = ["<div class='ttslb abt'>"]
346
  for p in about.get("intro", []):
347
  parts.append(f"<p class='abt-p'>{html.escape(p)}</p>")
348
  cards = []
349
  for panel in about.get("panels", []):
350
+ if panel.get("tab") not in tabs:
351
+ continue
352
  body = "".join(f"<p>{html.escape(q)}</p>" for q in panel.get("paragraphs", []))
353
  cards.append(
354
  f"<div class='abt-card' role='button' tabindex='0' "
 
961
  curated multi-turn contrasts), rendered below the board
962
  table: one category tab per factor (first-seen manifest order, switching in
963
  APP_JS), each a list of label + audio player rows. A single-category
964
+ modality gets no tab row — just the rows. A sample's
965
  "text" (generation prompt) and "model" attribution are kept in the manifest
966
  but not displayed; a "transcript" (the human reference for ASR golden
967
  samples) is rendered next to the player. Rows carrying a "group" cluster