Skip to content
CodexgreenfieldWeb45 files · +3957 −345

Build a HF-Space text adventure storyboard TUI with Modal LLM backend

Session from build-small-agent-trace on Hugging Face by drdavidtang · MIT · condensed by Coders Talk

3h 28msession
1interventions
GOAL

Build a retro terminal-style storyboarding app (React/FastAPI on HF Docker Spaces) that turns a rough idea into a four-scene story with AI-generated art, then iterate the architecture toward Modal serverless GPUs and better ASCII/pseudo-ASCII visuals.

  1. Prompt · +0
    Build a full HF Docker Space text adventure: React/Vite/xterm frontend, FastAPI backend, HF serverless inference for LLM and ASCII art generation, as a storyboarding TUI for YouTube storytelling.
  2. Agent did · +0m
    Scaffolded the full app from scratch: Dockerfile, FastAPI backend with engine/main, React/Vite/xterm frontend, verified Python compile, TS build, and full Docker build/run smoke tests.
  3. Prompt · +23m
    Push code to [email protected]:spaces/build-small-hackathon/storyboard-tui
  4. Intervention · +25m
    Interrupted the agent's SSH auth debugging, added their own SSH key, pulled, and told the agent to merge and push everything.
    Why: I'd already fixed the SSH key issue on my end so I didn't need the agent burning turns diagnosing local ssh-agent config.
  5. Agent did · +28m
    Merged unrelated histories with the HF Space's initial commit, verified frontend/backend builds, pushed merged main successfully.
  6. Break · 18h 52m away, not counted
  7. Prompt · +31m
    Expand architecture to use Modal serverless GPU for LLM inference (nemotron, openBMB MiniCPM) with HF Spaces for frontend/CPU, using Modal memory snapshots for cold starts.
  8. Break · 50m away, not counted
  9. Agent did · +37m
    Implemented Modal L4 provider for MiniCPM chat, Nemotron H100 planner for four-scene stories, BFL direct API for images (swapped from HF inference), and full frontend journey redesign (intro, idea input, storyboard view) with 20 generated fallback assets.
  10. Break · 21h 28m away, not counted
  11. Fail · +1h 55m
    Users reported the ASCII converter badly distorted geometric shapes like hourglass and clock — luminance-based and then line-glyph approaches both failed before skeletonization was tried.
  12. Fail · +2h 35m
    Developer judged the skeletonized ASCII output as still looking bad and asked for pseudo-ASCII hacks instead.
  13. Agent did · +2h 55m
    Tested and adopted a different approach: prompting FLUX directly to generate images that already look like terminal glyph art, skipping the pixel-to-ASCII conversion pipeline entirely; wired this as the storyboard's default rendering path.
  14. Break · 1h 04m away, not counted
  15. Outcome · +3h 28m
    Session ended with a working HF Space app: direct-FLUX pseudo-ASCII rendering pipeline, 20 fallback assets, Modal MiniCPM/Nemotron backends, and six generated portrait assets for a 'Professor Alder Wren' guide persona woven into UI copy and both LLMs' system prompts.
VERDICT

Next time I'd ask for FLUX-generated pseudo-ASCII art directly from the start instead of spending hours iterating on a pixel-to-ASCII converter (luminance, edge-weighting, skeletonization) that never looked good enough. The correction that actually worked was abandoning image-to-text conversion entirely and just prompting the image model to produce terminal-glyph-styled rasters directly. Merging unrelated git histories and switching image providers (HF inference -> direct BFL) went smoothly once I gave clear direction.

I tried this · 0

Discussion · 0

How Builds work