Spaces:
Runtime error
Runtime error
Fix bug
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ def process_image(image):
|
|
49 |
width, height = image.size
|
50 |
|
51 |
# encode
|
52 |
-
encoding =
|
53 |
offset_mapping = encoding.pop('offset_mapping')
|
54 |
|
55 |
# forward pass
|
|
|
49 |
width, height = image.size
|
50 |
|
51 |
# encode
|
52 |
+
encoding = processor(words, boxes=boxes, truncation=True, return_offsets_mapping=True, return_tensors="pt")
|
53 |
offset_mapping = encoding.pop('offset_mapping')
|
54 |
|
55 |
# forward pass
|