BlackSpire commited on
Commit
08f4f04
·
verified ·
1 Parent(s): 7a28e6a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -91,10 +91,10 @@ async def run_ocr(file: UploadFile) -> str:
91
  image_b64 = base64.b64encode(content).decode()
92
 
93
  # FIX 2: Matches reference limit — base64 must be < 180,000 characters
94
- if len(image_b64) >= 180_000:
95
  raise HTTPException(
96
  status_code=413,
97
- detail="Image too large (base64 must be < 180,000 chars). Resize the image and try again.",
98
  )
99
 
100
  # Payload structure matches the official reference exactly
 
91
  image_b64 = base64.b64encode(content).decode()
92
 
93
  # FIX 2: Matches reference limit — base64 must be < 180,000 characters
94
+ if len(image_b64) >= 1000_000:
95
  raise HTTPException(
96
  status_code=413,
97
+ detail="Image too large (base64 must be < 1,000,000 chars). Resize the image and try again.",
98
  )
99
 
100
  # Payload structure matches the official reference exactly