Introduction
The Udacity PyTorch Scholarship Challenge course, that I took from November 9th 2018 to January 9th 2019, has a task to create a text generator that is trained on a novel book.
This side project is building a text generator service and a PWA client accessing that service.
Using this client app, you can type a prime text, and the app will continue generating text from it.
Please run/install the app at https://text-generator.aldianfazrihady.com/.
Architecture
The PyTorch Model
I just need to re-use the PyTorch model trained for the assignment project. The checkpoint file and the inference code are hosted on the same machine. I call the machine as the inference box.
Hosting the Inference Box
I am using AWS SageMaker to host the inference box.
As SageMaker is only used for accepting inference, not model training, I needed to create a Docker image that wraps the inference algorithm and store it on AWS EC2 Container Repository.
After that, I created a SageMaker model that points to the Docker Image ARN, and created a SageMaker endpoint that uses the SageMaker model.