This is a basic example of using to Variational Autoencoder (VAE) to generate new examples similar to the dataset it was trained on. We'll be using Keras and the fashion-MNIST dataset. By default, the notebook is set to run for 50 epochs but you can increase that to increase the quality of the output.
Check out this really cool example http://blog.otoro.net/2016/04/01/generating-large-images-from-latent-vectors/
Andrej Karpathy (Director of AI at Tesla) also has a neat web based demo here: https://cs.stanford.edu/people/karpathy/convnetjs/demo/image_regression.html