Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -236,7 +236,7 @@ def inference(
|
|
236 |
)
|
237 |
|
238 |
# Verify the generated QR code
|
239 |
-
verify_result = scan_qr_code(out.images[0], sensitivity=verify_sensitivity)
|
240 |
|
241 |
return out.images[0], verify_result, initial_qr_base64
|
242 |
except Exception as e:
|
@@ -446,7 +446,7 @@ with gr.Blocks(theme=gr.themes.Monochrome()) as blocks:
|
|
446 |
"""
|
447 |
)
|
448 |
|
449 |
-
with gr.Accordion("QR Code Customization", open=
|
450 |
qr_version = gr.Slider(minimum=1, maximum=40, step=1, value=1, label="QR Code Version")
|
451 |
qr_error_correction = gr.Dropdown(choices=["L", "M", "Q", "H"], value="H", label="Error Correction Level")
|
452 |
qr_box_size = gr.Slider(minimum=1, maximum=50, step=1, value=10, label="Box Size")
|
|
|
236 |
)
|
237 |
|
238 |
# Verify the generated QR code
|
239 |
+
verify_result = scan_qr_code(out.images[0].convert('RGB'), sensitivity=verify_sensitivity)
|
240 |
|
241 |
return out.images[0], verify_result, initial_qr_base64
|
242 |
except Exception as e:
|
|
|
446 |
"""
|
447 |
)
|
448 |
|
449 |
+
with gr.Accordion("QR Code Customization", open=True):
|
450 |
qr_version = gr.Slider(minimum=1, maximum=40, step=1, value=1, label="QR Code Version")
|
451 |
qr_error_correction = gr.Dropdown(choices=["L", "M", "Q", "H"], value="H", label="Error Correction Level")
|
452 |
qr_box_size = gr.Slider(minimum=1, maximum=50, step=1, value=10, label="Box Size")
|