Spaces:
Runtime error
Runtime error
Update utility/utils.py
Browse files4 unmodified lines56789101111 unmodified lines2324252627282930314 unmodified linesimport jsonimport reimport easyocrimport spacyfrom PIL import Image, ImageEnhance, ImageDrawimport cv2import numpy as np11 unmodified lines# Initialize EasyOCR reader for extracting textreader = easyocr.Reader(['en'])# Initialize spaCy's English modelnlp = spacy.load("en_core_web_sm")def draw_boxes(image, bounds, color='red', width=2):draw = ImageDraw.Draw(image)for bound in bounds:4 unmodified lines567891011 unmodified lines2223242526274 unmodified linesimport jsonimport reimport easyocrfrom PIL import Image, ImageEnhance, ImageDrawimport cv2import numpy as np11 unmodified lines# Initialize EasyOCR reader for extracting textreader = easyocr.Reader(['en'])def draw_boxes(image, bounds, color='red', width=2):draw = ImageDraw.Draw(image)for bound in bounds:
utility/utils.py-4