acecalisto3 commited on
Commit
abeedee
·
verified ·
1 Parent(s): addbc12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -378,21 +378,21 @@ def process_all_inputs(urls, file, text, notes):
378
  logger.error(f"Processing error: {e}")
379
  return None, f"Error: {str(e)}", ""
380
 
381
- def generate_qr(json_data):
382
- """Generate QR code from JSON data and return the file path."""
383
- qr = qrcode.QRCode(
384
- version=40, # Force maximum version
385
- error_correction=qrcode.constants.ERROR_CORRECT_L, # Use lower error correction
386
- box_size=10,
387
- border=4,
388
- )
389
  qr.add_data(json_data)
390
  qr.make(fit=True)
391
  return qr.make_image(fill_color="black", back_color="white")
392
 
393
- if json_data:
394
- return generate_qr_code(json_data)
395
- return None
396
 
397
  process_btn.click(
398
  process_all_inputs,
 
378
  logger.error(f"Processing error: {e}")
379
  return None, f"Error: {str(e)}", ""
380
 
381
+ def generate_qr(json_data):
382
+ """Generate QR code from JSON data and return the file path."""
383
+ qr = qrcode.QRCode(
384
+ version=40, # Force maximum version
385
+ error_correction=qrcode.constants.ERROR_CORRECT_L, # Use lower error correction
386
+ box_size=10,
387
+ border=4,
388
+ )
389
  qr.add_data(json_data)
390
  qr.make(fit=True)
391
  return qr.make_image(fill_color="black", back_color="white")
392
 
393
+ if json_data:
394
+ return generate_qr_code(json_data)
395
+ return None
396
 
397
  process_btn.click(
398
  process_all_inputs,