ocr_typhoon / examples /simple_ocr.py
trapezius60's picture
Upload 17 files
47d96e9 verified
raw
history blame
280 Bytes
from typhoon_ocr import ocr_document
import os
# please set env TYPHOON_API_KEY or OPENAI_API_KEY to use this function
script_dir = os.path.dirname(os.path.abspath(__file__))
image_path = os.path.join(script_dir, "test.png")
markdown = ocr_document(image_path)
print(markdown)