Generate new title for new york times articles
This a Flask application that spits generated title text based on the entered seed phrase and number of words that are entered to be generated. The model was created using keras and ipython notebook for the same is in the scripts folder.
Following are the steps followed in the notebook:
- The data was taken from kaggle New York Times Comments (https://www.kaggle.com/aashita/nyt-comments) dataset.
- Preprocessing is done to get the headlines from the dataset.
- N-gram tokens are generated and padded to make lengths equal.
- An LSTM model is created with one dropout layer.
The models or pickeled objects are not in models folder since it would increase the size of repository, but it can be easily created by running the notebook.
LIVE DEMO HERE -> https://nyttitlegenerator.appspot.com/
Flask, Tensorflow, Keras
https://www.kaggle.com/shivamb/beginners-guide-to-text-generation-using-lstms
Contribution => Reimplemented the code after understanding the above kaggle kernel mentioned in the reference. Used the generated model in a flask application which was built so that prediction for an input can be made interactive. Deployed on GCP using App Engine.
Major Learnings => Learnt how to use N-grams and LSTM for sequence prediction. Learnt how to built Flask application and serve a saved keras model. Learnt how to deploy on GCP using App Engine.