Skip to content

The TFLearn-Haiku generator, powered by Tensorflow and TfLearn, is a program that utilizes machine learning to generate haikus. While these haikus are not the best, the show simplicity and usefulness of programs such as this one.

Notifications You must be signed in to change notification settings

MaxLawton11/TFLearn-Haikus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TFLearn-Haikus

This Haiku generator project utilizes TensorFlow and TfLearn to create unique and creative haikus. With this program, you can generate beautiful haikus with just a few simple steps. To get started, make sure you have Tensorflow and TfLearn installed on your system. You can install them using pip3. The program comes with a pre-loaded dataset located in haiku_dataset.text, which contains a collection of haikus. However, if you have your own dataset that you prefer to use, you can switch it out with the provided one. To train the model, run the train.py file using Python 3. By default, the training process is set to run for 3 epochs, but you can easily modify this value inside the trainer script. Training for more epochs may improve the quality and diversity of the generated haikus. After completing the training (I found that around step 500,000 or after epoch 90 works well), you can generate text by running the generate.py script. The initial seed for the generator is set to randomly pick a line out of the dataset, can be easly changed to any phrase or sentence that inspires you. Also, tey changing the temperature for some interesting results. Happy haiku generating!

(Note: The computer you run this software on must be compatible with Tenserflow. Cpu's like the Apple M1 won't work. Check your hardware if you are having errors.)

About

The TFLearn-Haiku generator, powered by Tensorflow and TfLearn, is a program that utilizes machine learning to generate haikus. While these haikus are not the best, the show simplicity and usefulness of programs such as this one.

Topics

Resources

Stars

Watchers

Forks

Languages