def call_comprehend()

in workshops/AI_ML_services_workshop_information/lambda_code/ai_ml_services_lambda.py [0:0]


def call_comprehend(the_input=None):
    '''call the custom comprehend model that has been previously trained to classify the document according to its medical specialty type.'''
    client = boto3.client('comprehend')
    response= client.detect_sentiment(Text=the_input,LanguageCode='en')
    #response = client.classify_document(
    #    Text=the_input,
    #    EndpointArn=endpoint_arn
    #    )
    return(response)