Skip to content
CodexgreenfieldWeb8 files · +2496 −342

Build an F1 team-radio game with browser-based Tiny Aya judging (Gradio Space)

Session from pit-wall-chaos-traces on Hugging Face by build-small-hackathon · CC-BY-4.0 · condensed by Coders Talk

23msession
1interventions
GOAL

Build a small hackathon game where players hear real F1 team radio clips, reply in 12 words or fewer, and get judged by an in-browser Tiny Aya ONNX model, then deploy it as a Hugging Face Space.

  1. Prompt · +0
    Build a Gradio Space game around F1 team radio clips: start screen, dataset+model download, then main game loop using transformers.js and Tiny Aya ONNX for judging.
  2. Agent did · +0
    Read specs, dataset README, model README and example gradio app, then implemented app.py, index.html, static/app.js, static/styles.css and requirements.txt as a gradio.Server custom frontend with a start/loading/game screen flow.
  3. Prompt · +0
    The judge always returns the same fallback placeholder message no matter what I write - inference seems broken.
  4. Fail · +0
    First inference fix matched Tiny Aya's model/tokenizer setup from the working example, but placeholder messages persisted after retesting.
  5. Agent did · +0
    Traced the bug to the JSON extractor grabbing the nested 'delta' object instead of the full judge response; rewrote it to require the judge-shaped object with verdict fields, fixing the placeholder issue.
  6. Prompt · +0
    Messages only come from 2018, and the game skips straight to the closing screen without letting me read the final verdict.
  7. Agent did · +0
    Fixed final-round transition to wait for the next-button press, and switched dataset loading from 'first 260 valid clips' to reservoir sampling across a larger scanned window to fix the 2018-only skew.
  8. Fail · +0
    Reservoir sampling made loading too slow; switching to shuffled streaming caused all clips to skew to one year (2023, then 2024) instead, and the Dataset Viewer API approach had the same shard-bias problem.
  9. Intervention · +0
    Interrupted a long-running manifest build script and pointed the agent at local summary.json and transcripts.csv files instead of relying on flaky remote HF dataset/viewer sampling.
    Why: the remote dataset stream/viewer kept giving me season-biased windows no matter how I tuned it, and I remembered I already had the raw data locally, so let's just use that directly instead of fighting the API
  10. Agent did · +5m
    Rebuilt the clip loader to match transcripts.csv against summary.json locally by MP3 filename stem, producing 12,356 clips balanced across all years (2018-2025) with instant local startup, and dropped the datasets/huggingface_hub runtime dependencies.
  11. Break · 206h 55m away, not counted
  12. Agent did · +16m
    Renamed the app to Pit Wall Chaos, added a How To Play modal with a 2.3GB download warning styled like the Start Race button, then created and pushed the Space to build-small-hackathon/pit-wall-chaos, verifying it live via /prepare (12,356 clips) and a running Uvicorn process.
  13. Outcome · +23m
    Shipped a live, working Hugging Face Space (build-small-hackathon/pit-wall-chaos) with 12,356 year-balanced radio clips, working browser-based Tiny Aya judging, CPU-only hosting, and a handoff doc for the blog/social write-up.
VERDICT

Next time I'd mention upfront that streaming/shuffling a chronologically-shaped HF dataset is unreliable for randomness, and just point straight at the local summary.json/transcripts.csv files I already had instead of letting the agent try three different remote sampling strategies first. The fix that actually mattered was ditching the Dataset Viewer/streaming approach entirely for a local manifest built from files I generated myself, which finally gave both speed and balanced years. Interrupting the long manifest-build script and redirecting to local files saved a lot of wasted back-and-forth with a flaky API.

I tried this · 0

Discussion · 0

How Builds work