| title: Image Generator for HTML Games | |
| emoji: 🎮 | |
| colorFrom: blue | |
| colorTo: green | |
| sdk: gradio | |
| sdk_version: 6.14.0 | |
| app_file: app.py | |
| pinned: false | |
| # Image Generator for HTML Games | |
| Paste an HTML game, describe asset roles like `player`, `background`, or `enemy`, and generate a rewritten version of the game with image data embedded directly into the HTML. | |
| The app interprets the shared art style and pasted game code into explicit per-role image prompts, then generates and embeds game assets as base64 data URIs. | |
| If the Space has an `HF_TOKEN` secret, it first uses the text model in `HF_PROMPT_MODEL` to interpret the code, roles, and theme into image prompts. The default prompt model is `Qwen/Qwen2.5-Coder-7B-Instruct`. | |
| It then tries the image model in `HF_IMAGE_MODEL` for each role. The default image model is `black-forest-labs/FLUX.1-schnell`. Without `HF_TOKEN`, or if an API call fails, the app uses a local style-aware Pillow fallback that varies watercolor, vector/neon, claymation, oil-painting, anime, pixel-art looks, and common game sprite silhouettes. | |