Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -373,17 +373,17 @@ def process_all_inputs(urls, file, text, notes):
|
|
373 |
logger.error(f"Processing error: {e}")
|
374 |
return None, f"Error: {str(e)}", ""
|
375 |
|
376 |
-
|
377 |
def generate_qr(json_data):
|
378 |
"""Generate QR code from JSON data and return the file path."""
|
379 |
qr = qrcode.QRCode(
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
return qr.make_image(fill_color="black", back_color="white")
|
388 |
|
389 |
if json_data:
|
|
|
373 |
logger.error(f"Processing error: {e}")
|
374 |
return None, f"Error: {str(e)}", ""
|
375 |
|
376 |
+
|
377 |
def generate_qr(json_data):
|
378 |
"""Generate QR code from JSON data and return the file path."""
|
379 |
qr = qrcode.QRCode(
|
380 |
+
version=40, # Force maximum version
|
381 |
+
error_correction=qrcode.constants.ERROR_CORRECT_L, # Use lower error correction
|
382 |
+
box_size=10,
|
383 |
+
border=4,
|
384 |
+
)
|
385 |
+
qr.add_data(json_data)
|
386 |
+
qr.make(fit=True)
|
387 |
return qr.make_image(fill_color="black", back_color="white")
|
388 |
|
389 |
if json_data:
|