Poetry AI

Training AI to write poetry


Machine Learning


2 days


Personal Experiments

In the summer of 2018, I was experimenting with RNN models and trying to find some creative applications. To test its sequential learning ability, I made an LSTM model in python using Keras and fed it a dataset of poems. After training the model character by character, the model was then asked to predict new characters for an input of random words. The result was an entire poem written by the neural network.

It was really cool to see the network learn the sentence structure of poems. The model also generated rhyming words in some of the iterations. It does have some noise since it's trained character by character, but the overall output is extremely intriguing.

View the code on Github

Poem Screenshot

One of the generated poems