KroZenDev commited on
Commit
7eee37a
·
verified ·
1 Parent(s): c98b06b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -254,8 +254,8 @@ async def predict(file: UploadFile = File(...)):
254
  image = Image.open(io.BytesIO(contents))
255
  if image.mode != "RGB":
256
  image = image.convert("RGB")
257
- if image.width > 480 or image.height > 480:
258
- image.thumbnail((480, 480))
259
  img_array = np.array(image)
260
 
261
  async with ocr_semaphore:
 
254
  image = Image.open(io.BytesIO(contents))
255
  if image.mode != "RGB":
256
  image = image.convert("RGB")
257
+ if image.width > 1600 or image.height > 1600:
258
+ image.thumbnail((1600, 1600))
259
  img_array = np.array(image)
260
 
261
  async with ocr_semaphore: