arcana / README.md
JG1310's picture
submission: hackathon track + achievement tags, demo/blog/social/traces links
717604e verified
|
Raw
History Blame Contribute Delete
4.84 kB

A newer version of the Gradio SDK is available: 6.20.0

Upgrade
metadata
title: Arcana
emoji: ๐Ÿ”ฎ
colorFrom: purple
colorTo: indigo
sdk: gradio
sdk_version: 6.14.0
app_file: app.py
pinned: false
license: mit
tags:
  - track:wood
  - achievement:offgrid
  - achievement:offbrand
  - achievement:llama
  - achievement:sharing
  - achievement:fieldnotes

๐Ÿ”ฎ Arcana โ€” a themed concept-tarot generator & reader

Name any domain or theme โ€” thermodynamics, Lord of the Rings, breakfast foods, the French Revolution โ€” and Arcana invents a whole tarot deck for it, paints the 22 cards, and reads your fortune in them.

Built for the HF / Gradio Build Small Hackathon โ€” track Adventure in Thousand Token Wood.

Submission

Badges claimed: Off the Grid (no cloud APIs), Off-Brand (custom UI), Llama Champion (llama.cpp), Sharing is Caring (open agent traces), Field Notes (write-up).

How it works โ€” invent the meanings, then reason over them

The load-bearing AI move is not the art (plenty of tools draw tarot cards). It's the semantic invention โ€” deciding what each domain concept means archetypally โ€” and then the progressive reasoning over a spread of those concepts in combination. Both are language tasks, so a small โ‰ค32B text model is the right core.

theme + visual style
      โ”‚
      โ–ผ
 Deck Designer (Qwen3-14B)     maps the 22 Major Arcana โ†’ in-theme concepts (+ why)
      โ”‚
      โ–ผ
 Scribe (Qwen3-14B)            invents each card's meaning + art brief from the concept
      โ”‚                        (fanned across the GPU slots โ€” many cards at once)
      โ”œโ”€โ–บ image model (FLUX.2-klein) โ†’ 22 central arts + one deck-back (parallel)
      โ”‚        โ”‚
      โ”‚        โ–ผ
      โ”‚   Compositor (Pillow)  art + reusable gold frame + crisp title/numeral
      โ–ผ
 Reader / Oracle (Qwen3-14B)   draws a spread and turns the cards one at a time โ€”
                               a partial read as each lands, the synthesis held to the end

For example, mapping thermodynamics: Entropy โ†’ Death, Absolute Zero โ†’ The Hermit, The Critical Point โ†’ The Tower. The fit has to feel clever-but-right, never arbitrary โ€” that quality is the whole point.

Off the grid โ€” open models, โ‰ค32B, running on the model in front of you

No closed/frontier models, and no cloud inference APIs. Everything runs locally on the Space's own GPU (Hugging Face ZeroGPU):

  • Language โ€” Qwen3-14B (Apache-2.0, ~14.8B), one model for all three roles (mapping, scribe, reading), served in-process via llama.cpp (a Q4_K_M GGUF).
  • Image โ€” FLUX.2-klein (~9B, distilled, 4 steps), served in-process via diffusers.

The scribe and the painter are each fanned out across the ZeroGPU slots so the 22 cards' meanings and images are produced in parallel.

Using it

  • Generate New Deck โ€” type a theme, pick a visual style (Rider-Waite-Smith, Thoth, Marseille, Playful, or your own Custom look), conjure the deck. The deck view fills in card-by-card; download it as a self-contained .zip.
  • View Deck / Read from Existing Deck โ€” upload a deck .zip you downloaded earlier; it's reconstructed and opened (portable, no server-side storage).
  • A reading turns the cards face-up one at a time with a partial interpretation each, then weaves them into one synthesis.

Configuration (Space defaults to fully local)

env var value on the Space meaning
LLM_BACKEND local run the LLM in-process on the GPU (llama.cpp)
IMAGE_BACKEND local run the image model in-process on the GPU (diffusers)
LOCAL_IMAGE_MODEL black-forest-labs/FLUX.2-klein-9B the image model
HF_TOKEN โ€” Hub access for the model weights (Space secret)

The LLM defaults to unsloth/Qwen3-14B-GGUF. There is no cloud-inference path โ€” every model runs in-process on the Space's own GPU. It's "off the grid".

Assets & licensing

App code is MIT. Text is generated by Qwen3-14B (Apache-2.0). Card art is generated by FLUX.2-klein-9B โ€” "This FLUX Model is licensed by Black Forest Labs Inc. under the FLUX.2 Non-Commercial License" โ€” so generated decks are for non-commercial use. Title/numeral type is Cinzel (OFL).