简体   繁体   中英

How to call a python file in aws sagemaker from angular application?

I have created an angular application that takes an image as input, the image is then passed to a python script that performs a neural style transfer and returns the stylized image. I have created the python file and the angular frontend seperately and I'm stuck on the integration. I am using aws sagemaker to run the python script (due to its computation speed) but I have no idea how to call the python script with the image passed to it from angular. Any suggestions would be really appreciated. Thank you

You can create a lambda function and expose it using API gateway to be called by your angular app. this lambda in return will call the Sagemaker function you have

https://aws.amazon.com/blogs/machine-learning/call-an-amazon-sagemaker-model-endpoint-using-amazon-api-gateway-and-aws-lambda/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM