in workflow2_docsplitter/sam-app/functions/docsplitter_function/index.py [0:0]
def call_comprehend(text, comprehend, endpoint_arn):
# send in raw text for a document as well as the Comprehend custom classification model ARN
# returns JSON response containing the document's predicted class
print("Inputting text into Comprehend model")
return comprehend.classify_document(
Text=text,
EndpointArn=endpoint_arn
)