Spaces:
Sleeping
Sleeping
Update inference.py
Browse files- inference.py +1 -1
inference.py
CHANGED
@@ -16,7 +16,7 @@ model.to(device)
|
|
16 |
|
17 |
|
18 |
def prediction(image):
|
19 |
-
|
20 |
boxes, words = OCR(image)
|
21 |
encoding = processor(image, words, boxes=boxes, return_offsets_mapping=True, return_tensors="pt", truncation=True)
|
22 |
offset_mapping = encoding.pop('offset_mapping')
|
|
|
16 |
|
17 |
|
18 |
def prediction(image):
|
19 |
+
|
20 |
boxes, words = OCR(image)
|
21 |
encoding = processor(image, words, boxes=boxes, return_offsets_mapping=True, return_tensors="pt", truncation=True)
|
22 |
offset_mapping = encoding.pop('offset_mapping')
|