From 9a55dac4212776a05ce38700ce140a3ac2806019 Mon Sep 17 00:00:00 2001 From: Jonathan Chang Date: Thu, 5 Dec 2024 17:59:33 -0800 Subject: [PATCH] Swap over to tesseract for frontend requests --- OCR/ocr/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OCR/ocr/api.py b/OCR/ocr/api.py index a729f406..1e9bfb33 100644 --- a/OCR/ocr/api.py +++ b/OCR/ocr/api.py @@ -10,7 +10,7 @@ from fastapi import FastAPI, UploadFile, Form, HTTPException from fastapi.middleware.cors import CORSMiddleware -from ocr.services.image_ocr import ImageOCR +from ocr.services.tesseract_ocr import TesseractOCR from ocr.services.alignment import ImageAligner from ocr.services.image_segmenter import ImageSegmenter, segment_by_color_bounding_box @@ -31,7 +31,7 @@ segmenter = ImageSegmenter( segmentation_function=segment_by_color_bounding_box, ) -ocr = ImageOCR() +ocr = TesseractOCR() def data_uri_to_image(data_uri: str):