Szczotar93
commited on
Commit
•
7fa1d9c
1
Parent(s):
844f5fc
Update handler.py
Browse files- handler.py +7 -5
handler.py
CHANGED
@@ -7,12 +7,14 @@ import os
|
|
7 |
# install tesseract-ocr and pytesseract
|
8 |
# run("apt install -y tesseract-ocr", shell=True, check=True)
|
9 |
# run("pip install pytesseract", shell=True, check=True)
|
10 |
-
|
11 |
-
|
12 |
-
os.system('
|
|
|
|
|
|
|
13 |
os.system('pip install -q pytesseract')
|
14 |
-
|
15 |
-
print(os.system("--tessdata-dir /path"))
|
16 |
# helper function to unnormalize bboxes for drawing onto the image
|
17 |
import pytesseract
|
18 |
pytesseract.pytesseract.tesseract_cmd =r'/usr/bin/tesseract'
|
|
|
7 |
# install tesseract-ocr and pytesseract
|
8 |
# run("apt install -y tesseract-ocr", shell=True, check=True)
|
9 |
# run("pip install pytesseract", shell=True, check=True)
|
10 |
+
|
11 |
+
subprocess.check_call("apt-get install tesseract-ocr -y", shell=True)
|
12 |
+
# os.system('chmod 777 /tmp')
|
13 |
+
# os.system('apt-get update -y')
|
14 |
+
# os.system('apt-get install tesseract-ocr -y')
|
15 |
+
|
16 |
os.system('pip install -q pytesseract')
|
17 |
+
|
|
|
18 |
# helper function to unnormalize bboxes for drawing onto the image
|
19 |
import pytesseract
|
20 |
pytesseract.pytesseract.tesseract_cmd =r'/usr/bin/tesseract'
|