From 24c15daaed102b26b4083759ec646a5d429e7eb7 Mon Sep 17 00:00:00 2001 From: KevinHuSh Date: Wed, 10 Apr 2024 16:00:48 +0800 Subject: [PATCH] fix es exception (#298) ### What problem does this PR solve? Issue link:#295 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/nlp/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rag/nlp/__init__.py b/rag/nlp/__init__.py index 8aac72533..206fcc2e1 100644 --- a/rag/nlp/__init__.py +++ b/rag/nlp/__init__.py @@ -135,9 +135,9 @@ def add_positions(d, poss): d["position_int"] = [] d["top_int"] = [] for pn, left, right, top, bottom in poss: - d["page_num_int"].append(pn + 1) - d["top_int"].append(top) - d["position_int"].append((pn + 1, left, right, top, bottom)) + d["page_num_int"].append(int(pn + 1)) + d["top_int"].append(int(top)) + d["position_int"].append((int(pn + 1), int(left), int(right), int(top), int(bottom))) def remove_contents_table(sections, eng=False):