Skip to content

Instantly share code, notes, and snippets.

@veryeasily
Last active June 30, 2018 05:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veryeasily/3a93ec969690859d25afdcb69419e70b to your computer and use it in GitHub Desktop.
Save veryeasily/3a93ec969690859d25afdcb69419e70b to your computer and use it in GitHub Desktop.
from flask import Flask
from textgenrnn import textgenrnn
app = Flask(__name__)
@app.route('/<text>')
def hello(text):
textgen = textgenrnn()
return textgen.generate(prefix=text,return_as_list=True)[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment