in backend/lambda/app.py [0:0]
def get_features(sm_runtime_client, sagemaker_endpoint, img_bytes):
response = sm_runtime_client.invoke_endpoint(
EndpointName=sagemaker_endpoint,
ContentType='application/x-image',
Body=img_bytes)
response_body = json.loads((response['Body'].read()))
features = response_body['predictions'][0]
return features