This is a follow up to my article on generating Walt Whitman stye poetry using Deep Learning: https://hackernoon.com/i-tried-my-hand-at-deep-learning-and-made-some-poetry-along-the-way-2e350c33376f
As I have been on an app-building role, I figured why not convert the model into an app as well. Once you have a trained Deep learning model, it can be a straightforward step to setup an app using it.
My initial inspiration for doing this project was to participate in the NaNoGenMo series: https://github.com/NaNoGenMo/2018
This is an annual competition that runs in November where people try to train algorithms to write novels. Unfortunately, we haven’t yet cracked the puzzle to write something worth reading that long using an algorithm (every year we get closer though!).
I settled on generating poetry because it’s easier to sound convincing (yay for art). And the poetry was…interesting. You can see it by using the app: https://leaves-of-ai.now.sh/
You can give it a root word or phrase and it will generate a verse starting from that. Pretty neat.
But it doesn’t end just here. Because now everything is setup, you can easily change the dataset and get a whole new app. Say you want to get some Shakespeare generated text. All you would have to do is change the dataset to that of Shakespeare’s plays and you have an AI Romeo and Juliet app. :)
One of the fastai students actually took my app and put his own spin on it and made an Elon Musk tweet generator! Hilarious and probably a way better idea than mine.
Have any cool ideas for this kind of an app? Let me know in the comments.
This project was built using the fastai library (which is in turn built on Pytorch). I used an AWD-LSTM based char-RNN network to generate our text.
You can find the full code here: https://github.com/btahir/leaves-of-ai