Spaces:
Runtime error
Runtime error
Update utility/utils.py
Browse files18 unmodified lines192021222324252618 unmodified lines# Initialize the InferenceClientclient = InferenceClient(model="mistralai/Mistral-7B-Instruct-v0.3", token=HFT)# Initialize EasyOCR reader for extracting textreader = easyocr.Reader(['en'])def draw_boxes(image, bounds, color='red', width=2):draw = ImageDraw.Draw(image)18 unmodified lines192021222324252627282918 unmodified lines# Initialize the InferenceClientclient = InferenceClient(model="mistralai/Mistral-7B-Instruct-v0.3", token=HFT)# Specify a custom model storage directory (ensure this path is writable)model_storage_directory = '/app/models'# Create the reader object and set the model storage directoryreader = easyocr.Reader(['en'], model_storage_directory=model_storage_directory)def draw_boxes(image, bounds, color='red', width=2):draw = ImageDraw.Draw(image)
utility/utils.py+5-2