This is a Markov Chain text generator in its simplest form. It trains on a given text file (corpus) and outputs a model in the form of Pickle. New text can then be generated based on this model.
At the moment states are updated at random which is not ideal. Much more can be done here.