A newer version of the Gradio SDK is available: 6.20.0
title: Ars Fabula VN
emoji: ๐ธ
colorFrom: pink
colorTo: indigo
sdk: gradio
sdk_version: 6.16.0
app_file: app.py
pinned: false
license: apache-2.0
short_description: An AI-driven visual novel โ a small LLM writes every scene
models:
- google/gemma-4-12b-it
tags:
- build-small-hackathon
๐ธ Ars Fabula VN
An AI-driven visual novel where every scene is written live by a small
LLM. The model narrates, voices a three-character cast, swaps
expressions and backgrounds, and offers branching choices โ through a
plain-text tool-call protocol ([TOOL: set_expression โฆ]) that any small
instruct model can speak. No fine-tune, no function-calling API.
Track: Thousand Token Wood ยท Hackathon: Build Small
How to play
- Press Begin on the title screen.
- Read at your own pace โ click / Space / Enter advances each beat.
- Pick a choice button, or type any action you want in the free-text bar.
- Save/Load slots persist for your session.
What's running
| Piece | On this Space (ZeroGPU) | At home |
|---|---|---|
| Scene writer | google/gemma-4-12b-it (bf16) via transformers, @spaces.GPU |
Gemma 4 26B-A4B MoE Q4_K_M GGUF on stock llama.cpp with MTP speculative decoding, on an 8 GB GPU |
| Character sprites | Curated set (pre-baked with the pipeline below) | Live ComfyUI pipeline: face-gated base gen โ expression warping โ background removal |
| Backgrounds | Preset library (same pipeline) | Preset + live txt2img for novel scene keys |
The engine is model-independent: the same code drives a mock model (for
tests), a llama.cpp server, or an in-process transformers model โ picked
by ARS_FABULA_BACKEND. On an 8 GB card the LLM and the diffusion stack
can't co-reside, so the home setup stops/relaunches servers around image
bakes; on ZeroGPU none of that is needed โ the GPU is granted per call.
There's also a Docker variant (see Dockerfile on the repo) that runs
the full 26B + live ComfyUI casting on a dedicated T4.
Run it locally
pip install -r requirements.txt gradio==6.16.0
bash tools/start_gemma_server_stock.sh & # stock llama.cpp + MTP
python app.py
ARS_FABULA_BACKEND=mock python app.py # no model needed