refactor
Browse files- handler.py +2 -1
handler.py
CHANGED
@@ -41,7 +41,8 @@ class EndpointHandler:
|
|
41 |
pass
|
42 |
|
43 |
def __call__(self, data: Any) -> List[List[Dict[str, str]]]:
|
44 |
-
|
|
|
45 |
if isinstance(pdfdata, str):
|
46 |
print("decoding pdfdata")
|
47 |
pdfdata = base64.b64decode(pdfdata)
|
|
|
41 |
pass
|
42 |
|
43 |
def __call__(self, data: Any) -> List[List[Dict[str, str]]]:
|
44 |
+
inputs = data.pop("inputs", data)
|
45 |
+
pdfdata = inputs.pop("filedata", inputs)
|
46 |
if isinstance(pdfdata, str):
|
47 |
print("decoding pdfdata")
|
48 |
pdfdata = base64.b64decode(pdfdata)
|