From 1004769e80088021ba9aeee1feee3e9f748e93fd Mon Sep 17 00:00:00 2001 From: Riley Housden Date: Mon, 22 Aug 2022 15:00:25 -0400 Subject: [PATCH] change get_image_string to include check processes --- lib/ocr.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ocr.py b/lib/ocr.py index 8d1ed65..a6269f4 100644 --- a/lib/ocr.py +++ b/lib/ocr.py @@ -87,4 +87,7 @@ def get_room_data(img: bytes) -> list[Room]: return rooms def get_image_string(img: bytes) -> str: - return image_to_string(Image.open(BytesIO(img))) \ No newline at end of file + img_string = image_to_string(Image.open(BytesIO(img))) + img_string = correct_newlines(img_string) + img_string = correct_commas(img_string) + return img_string \ No newline at end of file