From 22ebf703f745dc507890e6122842bcda0680ca5a Mon Sep 17 00:00:00 2001 From: Billy Bao Date: Fri, 12 Dec 2025 17:37:34 +0800 Subject: [PATCH] fix presentation --- rag/app/presentation.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rag/app/presentation.py b/rag/app/presentation.py index 7ce801749..32a9850b9 100644 --- a/rag/app/presentation.py +++ b/rag/app/presentation.py @@ -227,8 +227,9 @@ def chunk(filename, binary=None, from_page=0, to_page=100000, for pn, (txt, img) in enumerate(sections): d = copy.deepcopy(doc) pn += from_page - if img: - d["image"] = img + if not isinstance(img, Image.Image): + img = None + d["image"] = img d["page_num_int"] = [pn + 1] d["top_int"] = [0] d["position_int"] = [(pn + 1, 0, img.size[0] if img else 0, 0,