Update layout_utils.py by changing an "if" to an "elif" keyword.

See issue raised in https://github.com/DS4SD/docling/issues/362#issue-2668114001

Signed-off-by: Raphaël M.J.I. Larsen <39514032+Raphilanthrope@users.noreply.github.com>
This commit is contained in:
Raphaël M.J.I. Larsen 2024-11-22 20:47:27 +01:00 committed by GitHub
parent d7072b4b56
commit 31151291a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -388,7 +388,7 @@ def adapt_bbox(raw_cells, cluster, orphan_cell_indices):
[raw_cells[cid]["bbox"] for cid in cluster["cell_ids"]]
)
logger.debug(" New bounding box:" + str(new_bbox))
if cluster["type"] == DocItemLabel.PICTURE:
elif cluster["type"] == DocItemLabel.PICTURE:
## We only make the bbox completely comprise included text cells:
logger.debug(" Picture")
if len(cluster["cell_ids"]) != 0: