File size: 1,585 Bytes
33cc0e8
a6b78cf
 
33cc0e8
 
 
 
 
 
 
a6b78cf
 
 
 
 
 
 
 
bca7030
 
33cc0e8
 
a6b78cf
 
6595792
 
a6b78cf
 
0be22e5
 
1f28d42
0be22e5
1f28d42
0be22e5
a6b78cf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
title: Perry Alchemist - Comic Generator
emoji: ⚗️
colorFrom: purple
colorTo: yellow
sdk: gradio
sdk_version: 6.18.0
python_version: '3.13'
app_file: app.py
pinned: false
short_description: perry- the alchemist 
license: mit
tags:
  - comics
  - gradio
  - huggingface-spaces
  - image-generation
  - story-generation
  - track:wood
  - sponsor:modal
---

# Perri Comic Generator

Track:An Adventure in Thousand Token Wood

Retro comic strip generator built around a single-panel workflow.

blogpost: https://dev.to/meemeealm/building-perri-a-comic-strip-generator-5a91

social media: https://x.com/siniyny/status/2066659720413479294

video: https://vimeo.com/1201597662

## What it does

- Takes a short story seed from the user
- Builds a single structured comic panel description
- Generates the panel image on a backend diffusion worker
- Renders dialogue directly onto the image before returning it to the frontend

## Architecture

- `/app.py`
  - Gradio UI
  - Prompt collection
  - API request/response handling
- `/orchestrator.py`
  - Single-panel script generation
  - Panel image generation
  - Dialogue overlay composition
- `magic_theme.py`
  - Shared theme and CSS styling

## Local run

```bash
python frontend/app.py
```

## Environment

Required backend secret / env values:

- `HF_TOKEN`
- `MODAL_ENDPOINT_URL` for the frontend

## Notes

- The frontend expects the backend to return a single `panel` object
- The backend returns JPEG bytes encoded as base64 for the frontend image component
- The UI uses a magical vintage theme with star twinkle overlays