Spaces:
Runtime error
Runtime error
Commit
·
c981ca5
1
Parent(s):
69fedc9
debug
Browse files
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=
|
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 |
|