Steps involved:
- create a Python Lambda function with the Serverless Framework.
- add the respective summarization and ner models to our function and create an individual inference pipeline.
- Create a custom docker image for both
- Deploy a custom docker image to Amazon ECR
- Deploy AWS Lambda function with a custom docker image
- Test Serverless APIs
Follow the tutorial at https://www.philschmid.de/serverless-bert-with-huggingface-aws-lambda-docker to create docker images.
Huggung Face models:
- For text summarization: https://huggingface.co/sshleifer/distilbart-cnn-12-6
- For Named Entity Recognition: https://huggingface.co/dslim/bert-base-NER
- For summarization: https://eyzkheoq1d.execute-api.us-east-1.amazonaws.com/dev/qa
- For NER : https://ej1c3zhs6g.execute-api.us-east-1.amazonaws.com/dev/qa
https://codelabs-preview.appspot.com/?file_id=1376pofyspTVM8YhhbUKDEpiNaxczACY9KN0wI6lGPEg#0