# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python [anaconda3]
#     language: python
#     name: Python [anaconda3]
# ---

from textgenrnn import textgenrnn # Also requires tensorflow backend to be installed
textgen = textgenrnn() 

textgen.train_from_file('../data/post_titles.txt',
                        new_model=True,
                        max_length=4,
                        num_epochs=40,
                        dropout=.2)

# # Text Generation

textgen.generate(5, temperature=.25)

textgen.generate(5, temperature=.5)

textgen.generate(5, temperature=.75)

textgen.generate(5, temperature=1)

StarcoderdataJupyterScriptsDedupFiltered