This is the hackathon version, and more experienced engineers will notice that we neglect a lot of best practices in favor of saving developer time. In my defense, I did add pretty usable logging.
We will start from where we left off when we talked about text classification using machine learning methods. There are a few challenges that we left untouched:
- Model persistence: How can I write the model, data, and code to disk?
- Model loading and prediction: How can I load the model data and code from disk?
- Flask for REST endpoints: How can I expose the loaded model over the web?
If there is anything that you take away from this chapter, it should be the preceding three questions. If you have a clear and complete idea regarding how to tackle these three questions, your battle is won.
We will use a scikit-learn model and the same TF-IDF based pipelines we are familiar...