Skip to content
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

28 lines (23 sloc) 707 Bytes
from flask import Flask
from flask import request
from generate_conditional import conditional
app = Flask(__name__)
def hello_world():
input = request.args.get('input')
top_k = request.args.get('top_k', 100, int)
return conditional(raw_text_input=input, top_k=int(top_k))
def hello_test():
return 'pong'
def shutdown_server():
func = request.environ.get('werkzeug.server.shutdown')
if func is None:
raise RuntimeError('Not running with the Werkzeug Server')
def shutdown():
return 'Server shutting down...'
if __name__ == '__main__':,host='')
You can’t perform that action at this time.