/poetry-generator

Train a model using TensorFlow to write short poems.

Primary LanguageJupyter NotebookMIT LicenseMIT

poetry-generator

GitHub issues GitHub forks GitHub stars GitHub license

Train a model using TensorFlow to write short poems.

Check out the medium post for a detailed expaination here.

DATA:


You can get the data used from training from here. A sample of this data would look like:

From fairest creatures we desire increase,
That thereby beauty's rose might never die,
But as the riper should by time decease,
His tender heir might bear his memory:
But thou contracted to thine own bright eyes,
Feed'st thy light's flame with self-substantial fuel,
Making a famine where abundance lies,
Thy self thy foe, to thy sweet self too cruel:
Thou that art now the world's fresh ornament,
And only herald to the gaudy spring,
Within thine own bud buriest thy content,
And, tender churl, mak'st waste in niggarding:
Pity the world, or else this glutton be,
To eat the world's due, by the grave and thee.

Environment and tools Used:


1. Jupyter Notebook
2. Numpy
3. Matplotlib
4. Tensorflow

Required package installation:


pip install tensorflow==2.1.0
pip install numpy

Results


Character level

Training accuracy vs epochs

Training accuracy vs epochsr


Training loss vs epochs

Training loss vs epochs