JustinLin610 commited on
Commit
c981ca5
1 Parent(s): 69fedc9
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -178,7 +178,7 @@ def ocr(img, task_type):
178
  ocr_result = []
179
  for i, (box, image) in enumerate(zip(box_list, image_list)):
180
  image = Image.fromarray(image)
181
- sample = construct_sample(image, cfg.task.patch_image_size, is_document=(task_type=='Document'))
182
  sample = utils.move_to_cuda(sample) if use_cuda else sample
183
  sample = utils.apply_to_sample(apply_half, sample) if use_fp16 else sample
184
 
 
178
  ocr_result = []
179
  for i, (box, image) in enumerate(zip(box_list, image_list)):
180
  image = Image.fromarray(image)
181
+ sample = construct_sample(image, cfg.task.patch_image_size, is_document=False)
182
  sample = utils.move_to_cuda(sample) if use_cuda else sample
183
  sample = utils.apply_to_sample(apply_half, sample) if use_fp16 else sample
184