unable to extract text using tika in sagemaker, what is the reason for this?

26 Views Asked by At

code I've used:

from tika import parser
headers = {
'X-Tika-PDFextractInlineImages': 'true',
}
text = parser.from_file("pdffiles/BG1309020268.pdf",headers=headers)
print(text)
text = parser.from_buffer("pdffiles/BG1307018880.pdf")
text_content=text.get('content')
print(text_content)

working perfectly locally, but when I execute this in sagemaker studio getting result as None.

0

There are 0 best solutions below