| title: DiffusionPen Ukrainian Handwriting | |
| emoji: ✍️ | |
| colorFrom: blue | |
| colorTo: yellow | |
| sdk: gradio | |
| sdk_version: "5.25.0" | |
| app_file: app.py | |
| pinned: false | |
| license: apache-2.0 | |
| hardware: zero-gpu | |
| # DiffusionPen — Ukrainian Handwriting Generation | |
| Generates handwritten Ukrainian text conditioned on writer style using a diffusion model. | |
| **Architecture:** DiffusionPen (Nikolaidou et al., ECCV 2024) with Stable Diffusion v1.5 VAE + DDIM scheduler | |
| **Training data:** 126K Ukrainian handwritten word images from 308 writers | |
| **Text encoder:** CANINE-C | |
| **Style encoder:** MobileNetV2 | |
| ## Usage | |
| 1. Enter a Ukrainian word or sentence | |
| 2. Pick a writer ID (or leave on Random) | |
| 3. Adjust CFG scale (5.0 recommended) | |
| 4. Click Generate | |
| ## Notes | |
| - Short words (1–3 chars) have higher error rate (~42% CER) due to recognizer limitations, not generation failure | |
| - Rare letters (ґ, Є, Щ) and apostrophe words (м'яч) may render slightly weaker | |
| - Fix the variation seed to any positive integer to reproduce exact output; -1 = random | |