-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
24 lines (20 loc) · 787 Bytes
/
app.py
File metadata and controls
24 lines (20 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# app.py
# from flask import Flask
# app = Flask(__name__)
# @app.route("/")
# def hello():
# import os
# buf = []
# for a in os.environ:
# if a.startswith('AWS_') or a.startswith('npm_'): continue
# buf.append("> "+a+"="+os.getenv(a))
# return "Hello World!" + "\r\n" + "\n".join(buf)
# reference: http://flask.pocoo.org/docs/1.0/tutorial/
from src import create_app
app = create_app()
# if this is the main thread of execution first load the model and then start the server
if __name__ == "__main__":
print(("* Loading Keras model and Flask starting server..."
"please wait until server has fully started"))
# host='0.0.0.0' parameter makes the server accessible from external IPs.
app.run(host='0.0.0.0', threaded=False, port=8201)