fantos commited on
Commit
a3614d9
ยท
verified ยท
1 Parent(s): 52d6bf2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -15
app.py CHANGED
@@ -252,6 +252,8 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as Kolors:
252
  placeholder="Enter text to be converted into an image",
253
  lines=3
254
  )
 
 
255
  with gr.Row():
256
  with gr.Column():
257
  gr.Markdown("Text Position")
@@ -343,23 +345,20 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as Kolors:
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
- "๋ฉ‹์ง„ ์•Œํ”„์Šค ํ’๊ฒฝ, ๊ณ ํ’ˆ์งˆ, ์ดˆ๊ณ ํ•ด์ƒ๋„, ์ƒ์ƒํ•œ ์ƒ‰์ƒ, ์ตœ๊ณ ์˜ ํ’ˆ์งˆ, 8k, HD, 4K",
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)
 
252
  placeholder="Enter text to be converted into an image",
253
  lines=3
254
  )
255
+
256
+
257
  with gr.Row():
258
  with gr.Column():
259
  gr.Markdown("Text Position")
 
345
  # Add examples
346
  gr.Examples(
347
  examples=[
348
+ ["A serene beach sunset with palm trees silhouetted against the orange sky", "PARADISE", "top-center", 100],
349
+ ["A futuristic cityscape with flying cars and neon lights", "CYBER\nCITY\n2077", "bottom-right", 60]
 
 
 
 
 
 
 
 
 
 
350
  ],
351
  inputs=[prompt, text_for_image, text_position, font_size],
352
+ label="Examples"
353
+ )
354
+
355
+ canny_button.click(
356
+ fn = infer_canny,
357
+ 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],
358
+ outputs = [result, seed_used]
359
  )
360
 
361
+ # Set initial button states
362
+ Kolors.load(update_button_states, inputs=[text_position], outputs=position_buttons)
363
+
364
  Kolors.queue().launch(debug=True)