This commit is contained in:
Nick
2019-04-06 14:38:35 -06:00
parent 8adda8bbfb
commit 0ca733ecf8
3 changed files with 16 additions and 3 deletions
+6 -1
View File
@@ -1,5 +1,10 @@
runtime: python37
instance_class: F4_1G
entrypoint: gunicorn -b :$PORT main:app
env: flex
threadsafe: yes
handlers:
# This configures Google App Engine to serve the files in the app's static
# directory.
@@ -11,4 +16,4 @@ handlers:
# the entire handlers section) when there are no static files defined.
- url: /.*
script: auto
instance_class: F4
+8
View File
@@ -32,6 +32,14 @@ def root():
# For the sake of example, use static information to inflate the template.
# This will be replaced with real information in later steps.
return render_template('index.html')
@app.errorhandler(500)
def server_error(e):
logging.exception('An error occurred during a request.')
return """
An internal error occurred: <pre>{}</pre>
See logs for full stacktrace.
""".format(e), 500
@app.route('/generate', methods=['POST'])
+2 -2
View File
@@ -1,5 +1,5 @@
regex==2017.4.5
numpy
tensorflow
tensorflow==1.13.1
flask
gunicorn==19.7.1