Member-only story
NLP Text generative models: Generating tweets with Deep Learning
Natural language processing with FastAi, LSTM and transfer learning

Today we will practice Language Processing with Deep Learning. We will use transfer learning here, to fine tune our neural network that has been trained on Wiki Text data. This Neural network understands language constraints, and we will fine tune it with the tweeting style of Elon Musk.
We will then try to predict future Elon tweets. This should be a fun exercise.
Ethics First
It’s most important that we understand ethics and responsibilities while using predictive models that work on personal or sensitive data. While this text prediction exercise is not purely a Generative model, but we make our Neural Network understand the tweeting style of an individual, and it should be used with responsibility.
Ok lets begin
Here we will use FastAi library for creating our deep learning models. We will use Kaggle dataset : Elon Musk’s Tweets to generate a language model to predict what will be the next tweet from Elon Musk.
If you haven’t watched FastAi tutorials already, please visit this link for the awesome and free tutorials.