Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ def process_image(image):
|
|
66 |
width, height = image.size
|
67 |
|
68 |
# encode
|
69 |
-
encoding = processor(image, truncation=
|
70 |
offset_mapping = encoding.pop('offset_mapping')
|
71 |
|
72 |
# forward pass
|
|
|
66 |
width, height = image.size
|
67 |
|
68 |
# encode
|
69 |
+
encoding = processor(image, truncation=False, return_offsets_mapping=True, return_tensors="pt")
|
70 |
offset_mapping = encoding.pop('offset_mapping')
|
71 |
|
72 |
# forward pass
|