Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -347,7 +347,7 @@ with gr.Blocks(theme='Hev832/Applio') as blocks:
|
|
| 347 |
)
|
| 348 |
|
| 349 |
with gr.Accordion("Advanced Art Controls", open=True):
|
| 350 |
-
with gr.
|
| 351 |
controlnet_conditioning_scale = gr.Slider(
|
| 352 |
minimum=0.0,
|
| 353 |
maximum=5.0,
|
|
@@ -370,7 +370,7 @@ with gr.Blocks(theme='Hev832/Applio') as blocks:
|
|
| 370 |
"""
|
| 371 |
)
|
| 372 |
|
| 373 |
-
with gr.
|
| 374 |
strength = gr.Slider(
|
| 375 |
minimum=0.0,
|
| 376 |
maximum=1.0,
|
|
@@ -391,7 +391,7 @@ with gr.Blocks(theme='Hev832/Applio') as blocks:
|
|
| 391 |
"""
|
| 392 |
)
|
| 393 |
|
| 394 |
-
with gr.
|
| 395 |
guidance_scale = gr.Slider(
|
| 396 |
minimum=0.0,
|
| 397 |
maximum=50.0,
|
|
@@ -414,7 +414,7 @@ with gr.Blocks(theme='Hev832/Applio') as blocks:
|
|
| 414 |
"""
|
| 415 |
)
|
| 416 |
|
| 417 |
-
with gr.
|
| 418 |
sampler = gr.Dropdown(
|
| 419 |
choices=list(SAMPLER_MAP.keys()),
|
| 420 |
value="DPM++ Karras SDE",
|
|
@@ -435,7 +435,7 @@ with gr.Blocks(theme='Hev832/Applio') as blocks:
|
|
| 435 |
"""
|
| 436 |
)
|
| 437 |
|
| 438 |
-
with gr.
|
| 439 |
seed = gr.Slider(
|
| 440 |
minimum=-1,
|
| 441 |
maximum=9999999999,
|
|
@@ -456,58 +456,6 @@ with gr.Blocks(theme='Hev832/Applio') as blocks:
|
|
| 456 |
Try **-1** if you want to explore and generate different designs. If you find something you really love, write down the seed number and use it again to recreate the same design.
|
| 457 |
"""
|
| 458 |
)
|
| 459 |
-
with gr.Accordion("QR Code Customization", open=True):
|
| 460 |
-
bg_color = gr.ColorPicker(
|
| 461 |
-
label="Background Color",
|
| 462 |
-
value="#FFFFFF",
|
| 463 |
-
info="Choose the background color for the QR code"
|
| 464 |
-
)
|
| 465 |
-
qr_color = gr.ColorPicker(
|
| 466 |
-
label="QR Code Color",
|
| 467 |
-
value="#000000",
|
| 468 |
-
info="Choose the color for the QR code pattern"
|
| 469 |
-
)
|
| 470 |
-
invert_final_image = gr.Checkbox(
|
| 471 |
-
label="Invert Final Image",
|
| 472 |
-
value=False,
|
| 473 |
-
info="Check this to invert the colors of the final image"
|
| 474 |
-
)
|
| 475 |
-
with gr.Accordion("Model Selection", open=True):
|
| 476 |
-
controlnet_model_dropdown = gr.Dropdown(
|
| 477 |
-
choices=list(CONTROLNET_MODELS.keys()),
|
| 478 |
-
value="QR Code Monster",
|
| 479 |
-
label="ControlNet Model",
|
| 480 |
-
info="Select the ControlNet model for QR code generation"
|
| 481 |
-
)
|
| 482 |
-
diffusion_model_dropdown = gr.Dropdown(
|
| 483 |
-
choices=list(DIFFUSION_MODELS.keys()),
|
| 484 |
-
value="GhostMix",
|
| 485 |
-
label="Diffusion Model",
|
| 486 |
-
info="Select the main diffusion model for image generation"
|
| 487 |
-
)
|
| 488 |
-
with gr.Row():
|
| 489 |
-
run_btn = gr.Button("🎨 Create Your QR Art", variant="primary")
|
| 490 |
-
|
| 491 |
-
with gr.Column():
|
| 492 |
-
result_image = gr.Image(label="Your Artistic QR Code")
|
| 493 |
-
used_seed = gr.Number(label="Seed Used", interactive=False)
|
| 494 |
-
|
| 495 |
-
with gr.Row(visible=False):
|
| 496 |
-
scan_button = gr.Button("Verify QR Code Works")
|
| 497 |
-
scan_result = gr.Textbox(label="Validation Result of QR Code", interactive=False)
|
| 498 |
-
|
| 499 |
-
|
| 500 |
-
|
| 501 |
-
gr.Markdown(
|
| 502 |
-
"""
|
| 503 |
-
### 🔍 Analyzing Your Creation
|
| 504 |
-
- Is the QR code scannable? Check with your phone camera to see if it can scan it.
|
| 505 |
-
- If not scannable, use the Brightness, Contrast, and Saturation sliders to optimize the QR code for scanning.
|
| 506 |
-
- Does the art style match your prompt? If not, try adjusting the 'Prompt Adherence'.
|
| 507 |
-
- Want more artistic flair? Increase the 'Artistic Freedom'.
|
| 508 |
-
- Need a clearer QR code? Raise the 'QR Code Visibility'.
|
| 509 |
-
"""
|
| 510 |
-
)
|
| 511 |
|
| 512 |
with gr.Row():
|
| 513 |
brightness = gr.Slider(minimum=0.1, maximum=2.0, step=0.1, value=1.0, label="Brightness")
|
|
|
|
| 347 |
)
|
| 348 |
|
| 349 |
with gr.Accordion("Advanced Art Controls", open=True):
|
| 350 |
+
with gr.Row():
|
| 351 |
controlnet_conditioning_scale = gr.Slider(
|
| 352 |
minimum=0.0,
|
| 353 |
maximum=5.0,
|
|
|
|
| 370 |
"""
|
| 371 |
)
|
| 372 |
|
| 373 |
+
with gr.Row():
|
| 374 |
strength = gr.Slider(
|
| 375 |
minimum=0.0,
|
| 376 |
maximum=1.0,
|
|
|
|
| 391 |
"""
|
| 392 |
)
|
| 393 |
|
| 394 |
+
with gr.Row():
|
| 395 |
guidance_scale = gr.Slider(
|
| 396 |
minimum=0.0,
|
| 397 |
maximum=50.0,
|
|
|
|
| 414 |
"""
|
| 415 |
)
|
| 416 |
|
| 417 |
+
with gr.Row():
|
| 418 |
sampler = gr.Dropdown(
|
| 419 |
choices=list(SAMPLER_MAP.keys()),
|
| 420 |
value="DPM++ Karras SDE",
|
|
|
|
| 435 |
"""
|
| 436 |
)
|
| 437 |
|
| 438 |
+
with gr.Row():
|
| 439 |
seed = gr.Slider(
|
| 440 |
minimum=-1,
|
| 441 |
maximum=9999999999,
|
|
|
|
| 456 |
Try **-1** if you want to explore and generate different designs. If you find something you really love, write down the seed number and use it again to recreate the same design.
|
| 457 |
"""
|
| 458 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 459 |
|
| 460 |
with gr.Row():
|
| 461 |
brightness = gr.Slider(minimum=0.1, maximum=2.0, step=0.1, value=1.0, label="Brightness")
|