Skip to content

Instantly share code, notes, and snippets.

@cyberandy
Last active April 26, 2019 20:30
Show Gist options
  • Save cyberandy/43ff10a7e5f31a9dd54d19677e50a281 to your computer and use it in GitHub Desktop.
Save cyberandy/43ff10a7e5f31a9dd54d19677e50a281 to your computer and use it in GitHub Desktop.
How to generate keywords using textgenrnn (read more about it here: https://wordlift.io/blog/en/keyword-suggestion-tool-tensorflow/)
from textgenrnn import textgenrnn
textgen = textgenrnn(weights_path='keygen_weights.hdf5',
vocab_path='keygen_vocab.json',
config_path='keygen_config.json')
textgen.generate_samples(max_gen_length=5, temperatures=[0.2,0.5])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment