vkumartr commited on
Commit
d2c0721
·
verified ·
1 Parent(s): fb18bb4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -109,7 +109,7 @@ def extract_invoice_data(file_data, content_type, json_schema):
109
  if len(images) > 2:
110
  raise ValueError("PDF contains more than 2 pages. Only PDFs with 1 or 2 pages are supported.")
111
 
112
- for img in images[:2]: # Convert up to 2 pages
113
  img_byte_arr = io.BytesIO()
114
  img.save(img_byte_arr, format="PNG")
115
  base64_encoded = base64.b64encode(img_byte_arr.getvalue()).decode('utf-8')
 
109
  if len(images) > 2:
110
  raise ValueError("PDF contains more than 2 pages. Only PDFs with 1 or 2 pages are supported.")
111
 
112
+ for img in images[:2]:
113
  img_byte_arr = io.BytesIO()
114
  img.save(img_byte_arr, format="PNG")
115
  base64_encoded = base64.b64encode(img_byte_arr.getvalue()).decode('utf-8')