Project Thumbnail

Finding out if an AI can learn to do creative tasks like writing poetry or stories


Machine Learning


July 2018

Tools & Stack


Keras, Tensorflow

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.

Stages of the programming experience

One of the generated poems

I later trained the same model word by word instead of character by character on Facebook's stories' dataset (The Goldilock's Project dataset) to write short 100 word stories.