Spaces:
Paused
Paused
Update app.py
Browse files
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 |
-
|
| 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 |
-
|
| 361 |
-
|
| 362 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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)
|