Akjava commited on
Commit
a941e0f
·
1 Parent(s): c8a1001
Files changed (5) hide show
  1. app.py +10 -5
  2. examples/buy.webp +0 -0
  3. examples/play.webp +0 -0
  4. examples/rpg.webp +0 -0
  5. examples/start.webp +0 -0
app.py CHANGED
@@ -205,7 +205,12 @@ def run_inference_engine(
205
  gr.Warning(f"Error: {error}")
206
  yield None, generated_seed, f"Error: {error}"
207
  else:
208
- yield image[0][0]["image"], generated_seed, "Done!"
 
 
 
 
 
209
 
210
 
211
  # --- UI Customization ---
@@ -269,12 +274,12 @@ theme = gr.themes.Soft(primary_hue="indigo", secondary_hue="slate", radius_size=
269
  # Examples data
270
  example_data = [
271
  [
272
- "Play",
273
  "Neon glowing cyberpunk, blue/purple gradient",
274
  "box",
275
  "horizontal_3",
276
  "black",
277
- "examples/play.webp",
278
  ],
279
  [
280
  "Buy",
@@ -285,7 +290,7 @@ example_data = [
285
  "examples/buy.webp",
286
  ],
287
  [
288
- "RPG",
289
  "Wood texture, steel rim, fantasy game style",
290
  "free",
291
  "box_2x2",
@@ -305,7 +310,7 @@ example_data = [
305
  with gr.Blocks(css=css, theme=theme, title="UI Button Generator MCP") as demo:
306
  gr.Markdown("# 🎨 AI UI Button Generator")
307
  gr.Markdown(
308
- "<div class='subtitle'>UI button material and design concept generation tool using Z-Image-Turbo</div>"
309
  )
310
 
311
  with gr.Column(elem_id="col-container"):
 
205
  gr.Warning(f"Error: {error}")
206
  yield None, generated_seed, f"Error: {error}"
207
  else:
208
+ # Convert image to WebP format
209
+ original_image = image[0][0]["image"]
210
+ yield (
211
+ original_image,
212
+ generated_seed,
213
+ )
214
 
215
 
216
  # --- UI Customization ---
 
274
  # Examples data
275
  example_data = [
276
  [
277
+ "Start,Option,Exit",
278
  "Neon glowing cyberpunk, blue/purple gradient",
279
  "box",
280
  "horizontal_3",
281
  "black",
282
+ "examples/start.webp",
283
  ],
284
  [
285
  "Buy",
 
290
  "examples/buy.webp",
291
  ],
292
  [
293
+ "RPG,R,P,G",
294
  "Wood texture, steel rim, fantasy game style",
295
  "free",
296
  "box_2x2",
 
310
  with gr.Blocks(css=css, theme=theme, title="UI Button Generator MCP") as demo:
311
  gr.Markdown("# 🎨 AI UI Button Generator")
312
  gr.Markdown(
313
+ "<div class='subtitle'><p>UI button material and design concept generation tool using Z-Image-Turbo(<a href='https://huggingface.co/docs/hub/spaces-zerogpu'>Zero-GPU</a>)</p><p>Web and MCP without Header-Authorization,only few time you can try zero-gpu</p></div>"
314
  )
315
 
316
  with gr.Column(elem_id="col-container"):
examples/buy.webp CHANGED
examples/play.webp DELETED
Binary file (25.4 kB)
 
examples/rpg.webp CHANGED
examples/start.webp ADDED