File size: 1,080 Bytes
39ce61a
d7e3123
 
 
 
39ce61a
0c8ccf5
39ce61a
 
 
 
d7e3123
 
 
 
a908e86
311fb99
a908e86
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---
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.