Spaces:
Sleeping
Sleeping
WebashalarForML
commited on
Commit
•
7e56bff
1
Parent(s):
d7dae1c
Update utility/utils.py
Browse files- utility/utils.py +5 -2
utility/utils.py
CHANGED
@@ -19,8 +19,11 @@ HFT = os.getenv('HF_TOKEN')
|
|
19 |
# Initialize the InferenceClient
|
20 |
client = InferenceClient(model="mistralai/Mistral-7B-Instruct-v0.3", token=HFT)
|
21 |
|
22 |
-
#
|
23 |
-
|
|
|
|
|
|
|
24 |
|
25 |
def draw_boxes(image, bounds, color='red', width=2):
|
26 |
draw = ImageDraw.Draw(image)
|
|
|
19 |
# Initialize the InferenceClient
|
20 |
client = InferenceClient(model="mistralai/Mistral-7B-Instruct-v0.3", token=HFT)
|
21 |
|
22 |
+
# Specify a custom model storage directory (ensure this path is writable)
|
23 |
+
model_storage_directory = '/app/models'
|
24 |
+
|
25 |
+
# Create the reader object and set the model storage directory
|
26 |
+
reader = easyocr.Reader(['en'], model_storage_directory=model_storage_directory)
|
27 |
|
28 |
def draw_boxes(image, bounds, color='red', width=2):
|
29 |
draw = ImageDraw.Draw(image)
|