added scaffold struct for the prj
This commit is contained in:
7
kg_ocr/ocr/batch_processor.py
Normal file
7
kg_ocr/ocr/batch_processor.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from PIL import Image
|
||||
import pytesseract
|
||||
|
||||
|
||||
def extract_text(images: list[str]) -> list[str]:
|
||||
"""OCR a list of image paths into text."""
|
||||
return [pytesseract.image_to_string(Image.open(img)) for img in images]
|
||||
Reference in New Issue
Block a user