Based on Scikit-Learn stack
In this tutorial,
- We build a small text classification model, and write it to disk in
model_train.py
- Reuse this model, in
model_predict.py
- Expose the model using Flask with
api.py
Using Flask to create an API, we can deploy this model and create a simple web page to load and classify new movie reviews.
- Install pip and Python 3
- Clone this repository
- Navigate to the working directory
- Install the Python dependencies
pip install -r requirements.txt
- Run the API
python api.py
- Open a web browser and go to
http://localhost:8000