How to write with artificial intelligence

An easy guide to “Deep Writing” without writing any code

Max Deutsch
Jul 11, 2016 · 5 min read

“Dumbledore will get out from behind a cream cake” — Harry Potter: Written by Artificial Intelligence

Step 0: Understanding the simple intuition

Step 1: Download the code

Step 2: Customize the sample text

Step 3: Install TensorFlow

sudo easy_install pip
sudo easy_install --upgrade six
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.1-py2-none-any.whl
sudo pip install --upgrade $TF_BINARY_URL

Step 4: Train the model

source ~/tensorflow/bin/activate
cd ~/desktop/word-rnn-tensorflow-master
python train.py

Step 5: Create the “Deep Writing”

parser.add_argument(‘-n’, type=int, default=200, help=’number of words to sample’)
parser.add_argument(‘-n’, type=int, default=1500, help=’number of words to sample’)
python sample.py

Step 6: Submit your Deep Writing for publication


Max Deutsch is an obsessive learner, product builder, guinea pig for Month to Master, and founder at Openmind.

If you want to follow along with Max’s year-long accelerated learning project, make sure to follow this Medium account.

Deep Writing

Stories, songs, and speeches written by deep learning (artificial intelligence)

Max Deutsch

Written by

Obsessive learner and product builder. Founder at http://OpenmindLearning.com. Guinea pig for http://MonthToMaster.com. Get in touch at http://max.xyz.

Deep Writing

Stories, songs, and speeches written by deep learning (artificial intelligence)