How it works...

To evaluate the model, we were able to load command-line arguments with TensorFlow's app flags, load the model and vocabulary processor, and then run the processed data through the model and make a prediction.

Remember to run this script through the command line, and check that the training script is run before creating the model and vocabulary dictionary.

Get TensorFlow Machine Learning Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.