Upload processing_kosmos2.py
Browse files- processing_kosmos2.py +1 -1
processing_kosmos2.py
CHANGED
@@ -574,7 +574,7 @@ def clean_text_and_extract_entities_with_bboxes(text, num_patches_per_side=32):
|
|
574 |
adjusted_entity = adjust_entity_positions(entity, text)
|
575 |
bboxes_in_coords = list(map(lambda bbox: patch_index_to_coordinate(bbox[0], bbox[1], num_patches_per_side), bboxes))
|
576 |
|
577 |
-
entities.append(
|
578 |
|
579 |
def cleanup_spaces(text, entities):
|
580 |
new_text = text.strip()
|
|
|
574 |
adjusted_entity = adjust_entity_positions(entity, text)
|
575 |
bboxes_in_coords = list(map(lambda bbox: patch_index_to_coordinate(bbox[0], bbox[1], num_patches_per_side), bboxes))
|
576 |
|
577 |
+
entities.append(adjusted_entity + (bboxes_in_coords,))
|
578 |
|
579 |
def cleanup_spaces(text, entities):
|
580 |
new_text = text.strip()
|