Some checks failed
tests / core (macos-latest, py3.11) (push) Has been cancelled
tests / core (macos-latest, py3.12) (push) Has been cancelled
tests / core (macos-latest, py3.13) (push) Has been cancelled
tests / core (ubuntu-latest, py3.11) (push) Has been cancelled
tests / core (ubuntu-latest, py3.12) (push) Has been cancelled
tests / core (ubuntu-latest, py3.13) (push) Has been cancelled
tests / doctor CLI smoke test (push) Has been cancelled
8 lines
216 B
Python
8 lines
216 B
Python
import pytesseract
|
|
from PIL import Image
|
|
|
|
|
|
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]
|