Szczotar93
commited on
Commit
•
c3f97df
1
Parent(s):
7fa1d9c
Update handler.py
Browse files- handler.py +3 -1
handler.py
CHANGED
@@ -2,13 +2,15 @@ from typing import Dict, List, Any
|
|
2 |
from transformers import LayoutLMForTokenClassification, LayoutLMv2Processor
|
3 |
import torch
|
4 |
from subprocess import run
|
|
|
5 |
import os
|
6 |
|
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')
|
|
|
2 |
from transformers import LayoutLMForTokenClassification, LayoutLMv2Processor
|
3 |
import torch
|
4 |
from subprocess import run
|
5 |
+
import subprocess
|
6 |
import os
|
7 |
|
8 |
# install tesseract-ocr and pytesseract
|
9 |
# run("apt install -y tesseract-ocr", shell=True, check=True)
|
10 |
# run("pip install pytesseract", shell=True, check=True)
|
11 |
+
subprocess.check_call("id",shell = True)
|
12 |
subprocess.check_call("apt-get install tesseract-ocr -y", shell=True)
|
13 |
+
|
14 |
# os.system('chmod 777 /tmp')
|
15 |
# os.system('apt-get update -y')
|
16 |
# os.system('apt-get install tesseract-ocr -y')
|