Spaces:
Running on Zero
A newer version of the Gradio SDK is available: 6.19.0
title: FrogQuest
emoji: πΈ
colorFrom: green
colorTo: yellow
sdk: gradio
sdk_version: 6.17.3
python_version: '3.12'
app_file: app.py
hf_oauth: true
pinned: true
license: apache-2.0
short_description: A text-image based RPG built to help fight procrastination
tags:
- track:backyard
- track:wood
- sponsor:openai
- sponsor:nvidia
- sponsor:modal
- sponsor:black-forest-labs
- achievement:offgrid
- achievement:offbrand
- achievement:llama
- achievement:fieldnotes
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
FrogQuest
βΆοΈ Try the Space
π¬ Watch the demo
Read the Blog
Turn your real life goals into an 8-bit pixel-art text-adventure quest log where you are the hero. Named for the "Eat That Frog" method: your hardest/most important task is the frog β the boss quest you face first.
- Nemotron Nano 4B (text only, via llama.cpp on ZeroGPU) writes the quest JSON β Eat That Frog prioritization, linked sub-task chains, and optional self-care bonus quests.
- A fixed pixel-art frontend (
gr.Servercustom UI) renders that JSON as the quest log. - FLUX.2 [klein] 4B (diffusers) generates each quest's image using your uploaded photo as a reference, then edits that same image into success / "retreat to fight another day" states.
Your photo and quest state live in your browser (localStorage) and in a private per-user JSON record on the Space's storage. Sign in with your Hugging Face account (top right) and the record is keyed to your account β same state on any device, nothing to remember. Logged out, it's keyed by a random Hero Code shown in the left panel instead β paste it on a new device (or after a cleared browser) to get everything back. The photo is sent to the GPU only transiently during generation.
NOTE: after enabling/changing hf_oauth, fully restart (factory rebuild) the Space so the OAuth
login route gets registered β clicking Sign in before that yields a "Could not parse server
response" error.
Durable storage (Storage Bucket)
For the server-side record to survive Space restarts, mount a HF Storage Bucket:
- Create a bucket at https://huggingface.co/new-bucket (private is fine).
- Space Settings β Storage Buckets β Mount a bucket β pick it, mount path
/data, read-write. The app writesusers/<hero-code>.jsonfiles there (store.py;FROGQUEST_DATA_DIRoverrides the location, and without any mount it falls back to the container's ephemeral disk β fine for testing, wiped on rebuild).
GPU backend (ZeroGPU or Modal)
The GPU work (quest JSON + images) runs through a pluggable backend chosen by the
FROGQUEST_BACKEND env var. The frontend, signatures, and behavior are identical either way.
zerogpu (default). Everything runs in-Space on ZeroGPU.
- Set the Space hardware to ZeroGPU.
- First quest generation cold-downloads the models, then runs fast.
- Subject to ZeroGPU daily quotas (anon 2 min, free 5 min, PRO 40 min per day).
modal (opt-in). The Space runs on CPU-basic and offloads GPU work to Modal
(dedicated GPU, pay-per-second, no quota). Switching is two steps β the env var alone does NOT
change hardware:
- Set the Space hardware to CPU basic.
- Add a Space variable
FROGQUEST_BACKEND=modal.
One-time Modal setup:
pip install modalandmodal token new(authenticate).modal deploy modal_app.py(deploys thefrogquestapp: anLLMclass + aFluxclass).- Add
MODAL_TOKEN_IDandMODAL_TOKEN_SECRETas Space secrets so the Space can call Modal. - Optional: set
FROGQUEST_MODAL_FLUX_GPUbeforemodal deployto pick the image GPU (defaultA10G;L4cheaper;L40S/A100-40GBif it OOMs).
Optional: rename requirements-modal.txt β requirements.txt on the Space to skip installing the
heavy GPU libs (torch/diffusers/llama-cpp) and speed up CPU-basic builds.
