At the end of this notebook we will have made a simple site which a user can use to enter a movie review. The site will then send the review off to our deployed model which will predict the sentiment of the submitted review.
Getting the data
We'll be using the IMDb dataset
Taking a peek at the training data
Removing html tags and tokenizing text
Building word dictionary
Sending data to s3
Build and train Pytorch model
We'll deploy our model first to also test to make sure our deployment works as expected
Testing a review
Because the return value of our model is close to 1, we can be pretty sure the review was positive!
Deploying endpoint again for web app
Because we're going to be passing the model a string, and Pytorch expects a numpy array, we have to build a wrapper to the stringpredictor class.