Szczotar93
commited on
Commit
•
b2e9b6f
1
Parent(s):
d339386
Update handler.py
Browse files- handler.py +2 -0
handler.py
CHANGED
@@ -12,6 +12,8 @@ os.system('apt-get update -y')
|
|
12 |
os.system('apt-get install tesseract-ocr-pol-eng -y')
|
13 |
os.system('pip install -q pytesseract')
|
14 |
# helper function to unnormalize bboxes for drawing onto the image
|
|
|
|
|
15 |
def unnormalize_box(bbox, width, height):
|
16 |
return [
|
17 |
width * (bbox[0] / 1000),
|
|
|
12 |
os.system('apt-get install tesseract-ocr-pol-eng -y')
|
13 |
os.system('pip install -q pytesseract')
|
14 |
# helper function to unnormalize bboxes for drawing onto the image
|
15 |
+
import pytesseract
|
16 |
+
pytesseract.pytesseract.tesseract_cmd = '/usr/bin/tesseract'
|
17 |
def unnormalize_box(bbox, width, height):
|
18 |
return [
|
19 |
width * (bbox[0] / 1000),
|