Szczotar93
commited on
Commit
•
84522a1
1
Parent(s):
ecabb16
Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -132,7 +132,7 @@ class EndpointHandler:
|
|
132 |
def __init__(self, path=""):
|
133 |
# load model and processor from path
|
134 |
self.model = LayoutLMForTokenClassification.from_pretrained(path).to(device)
|
135 |
-
self.processor = LayoutLMv2Processor.from_pretrained(path)
|
136 |
|
137 |
def __call__(self, data: Dict[str, bytes]) -> Dict[str, List[Any]]:
|
138 |
"""
|
|
|
132 |
def __init__(self, path=""):
|
133 |
# load model and processor from path
|
134 |
self.model = LayoutLMForTokenClassification.from_pretrained(path).to(device)
|
135 |
+
self.processor = LayoutLMv2Processor.from_pretrained(path, apply_ocr=True)
|
136 |
|
137 |
def __call__(self, data: Dict[str, bytes]) -> Dict[str, List[Any]]:
|
138 |
"""
|