Building A Walt Whitman Poetry Generator App by@btahir
1,287 reads

Building A Walt Whitman Poetry Generator App

Read on Terminal Reader

Too Long; Didn't Read

featured image - Building A Walt Whitman Poetry Generator App
Bilal Tahir HackerNoon profile picture


Bilal Tahir
react to story with heart

This is a follow up to my article on generating Walt Whitman stye poetry using Deep Learning:

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:

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:


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:


. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa