From f5ab36737af1214d7a07e1d5b1b13ab382d2d93e Mon Sep 17 00:00:00 2001 From: kyy Date: Thu, 6 Nov 2025 14:37:03 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B3=80=EC=88=98=EB=AA=85=20=EC=9E=AC?= =?UTF-8?q?=EC=A0=95=EC=9D=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/test.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/test.py b/test/test.py index 3afffb8..4b5a3e1 100644 --- a/test/test.py +++ b/test/test.py @@ -228,10 +228,10 @@ def process_pdf(llm, sampling_params, pdf_path): contents += content + page_num_separator # Save results - json_path = os.path.join( + result_json_path = os.path.join( f"{config.OUTPUT_PATH}/result", f"{file_name_without_ext}.json" ) - pdf_out_path = os.path.join( + result_pdf_path = os.path.join( config.OUTPUT_PATH, f"{file_name_without_ext}_layouts.pdf" ) @@ -247,10 +247,10 @@ def process_pdf(llm, sampling_params, pdf_path): "parsed": contents, } - with open(json_path, "w", encoding="utf-8") as f: + with open(result_json_path, "w", encoding="utf-8") as f: json.dump(output_data, f, ensure_ascii=False, indent=4) - pil_to_pdf_img2pdf(draw_images, pdf_out_path) + pil_to_pdf_img2pdf(draw_images, result_pdf_path) print( f"{Colors.GREEN}Finished processing {pdf_path}. Results saved in {config.OUTPUT_PATH}{Colors.RESET}" ) @@ -283,7 +283,7 @@ def process_image(llm, sampling_params, image_path): print(result_out) # Save results - output_json_path = os.path.join( + result_json_path = os.path.join( f"{config.OUTPUT_PATH}/result", f"{file_name_without_ext}.json" ) result_image_path = os.path.join( @@ -316,7 +316,7 @@ def process_image(llm, sampling_params, image_path): "parsed": processed_text, } - with open(output_json_path, "w", encoding="utf-8") as f: + with open(result_json_path, "w", encoding="utf-8") as f: json.dump(output_data, f, ensure_ascii=False, indent=4) result_image.save(result_image_path)