fantos commited on
Commit
2618f18
·
verified ·
1 Parent(s): c43af94

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -1
app.py CHANGED
@@ -330,6 +330,7 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as Kolors:
330
  result = gr.Gallery(label="Result", show_label=False, columns=2)
331
  seed_used = gr.Number(label="Seed Used")
332
 
 
333
  canny_button.click(
334
  fn = infer_canny,
335
  inputs = [prompt, text_for_image, text_position, font_size, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps, controlnet_conditioning_scale, control_guidance_end, strength],
@@ -339,4 +340,26 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as Kolors:
339
  # Set initial button states
340
  Kolors.load(update_button_states, inputs=[text_position], outputs=position_buttons)
341
 
342
- Kolors.queue().launch(debug=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
330
  result = gr.Gallery(label="Result", show_label=False, columns=2)
331
  seed_used = gr.Number(label="Seed Used")
332
 
333
+
334
  canny_button.click(
335
  fn = infer_canny,
336
  inputs = [prompt, text_for_image, text_position, font_size, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps, controlnet_conditioning_scale, control_guidance_end, strength],
 
340
  # Set initial button states
341
  Kolors.load(update_button_states, inputs=[text_position], outputs=position_buttons)
342
 
343
+ # Add examples
344
+ gr.Examples(
345
+ examples=[
346
+ [
347
+ "A futuristic cityscape with flying cars and neon lights",
348
+ "FUTURE クラブ",
349
+ "top-center",
350
+ 100
351
+ ],
352
+ [
353
+ "야자수가 있고 석양 풍경의 멋진 바닷가",
354
+ "大韓민국 コーヒー",
355
+ "bottom-right",
356
+ 72
357
+ ]
358
+ ],
359
+ inputs=[prompt, text_for_image, text_position, font_size],
360
+ outputs=[result, seed_used],
361
+ fn=infer_canny,
362
+ cache_examples=True,
363
+ )
364
+
365
+ Kolors.queue().launch(debug=True)