philschmid HF staff commited on
Commit
f1a16dd
1 Parent(s): 75a111d

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +6 -0
handler.py CHANGED
@@ -1,6 +1,12 @@
1
  from typing import Dict, List, Any
2
  from transformers import AutoTokenizer, LayoutLMForSequenceClassification
3
  import torch
 
 
 
 
 
 
4
 
5
  class EndpointHandler():
6
  def __init__(self, path=""):
 
1
  from typing import Dict, List, Any
2
  from transformers import AutoTokenizer, LayoutLMForSequenceClassification
3
  import torch
4
+ import os
5
+
6
+
7
+ os.system("sudo apt install -y tesseract-ocr")
8
+ os.system("pip3 install pytesseract==0.3.9")
9
+
10
 
11
  class EndpointHandler():
12
  def __init__(self, path=""):