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]