Created
July 13, 2019 13:59
-
-
Save RoaldSchuring/31b37e09d84af08bb4c5bed522e4ba7c to your computer and use it in GitHub Desktop.
call_nearest_neighbors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
response = runtime.invoke_endpoint(EndpointName='sagemaker-scikit-learn-2019-07-04-13-00-07-919', | |
ContentType='application/json', | |
Body=wine_vector_output) | |
def decode(s, encoding="ascii", errors="ignore"): | |
return s.decode(encoding=encoding, errors=errors) | |
result = json.loads(decode(response['Body'].read())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment