diff --git a/app.py b/app.py index b6b9847..98f9a91 100644 --- a/app.py +++ b/app.py @@ -16,6 +16,9 @@ from werkzeug.utils import secure_filename from gevent.pywsgi import WSGIServer + +port = 5001 + # Define a flask app app = Flask(__name__) @@ -31,7 +34,7 @@ # Check https://keras.io/applications/ from keras.applications.resnet50 import ResNet50 model = ResNet50(weights='imagenet') -print('Model loaded. Check http://127.0.0.1:5000/') +print('Model loaded. Check http://127.0.0.1:'+str(port)+'/') def model_predict(img_path, model): @@ -83,5 +86,5 @@ def upload(): # app.run(port=5002, debug=True) # Serve the app with gevent - http_server = WSGIServer(('0.0.0.0', 5000), app) + http_server = WSGIServer(('0.0.0.0', port), app) http_server.serve_forever() diff --git a/requirements_freeze.txt b/requirements_freeze.txt new file mode 100644 index 0000000..3e586b8 --- /dev/null +++ b/requirements_freeze.txt @@ -0,0 +1,56 @@ +absl-py==0.8.1 +asgiref==3.2.3 +astor==0.8.0 +cachetools==3.1.1 +certifi==2019.11.28 +chardet==3.0.4 +Click==7.0 +cycler==0.10.0 +Django==3.0 +Flask==1.1.1 +gast==0.2.2 +gevent==1.4.0 +google-auth==1.9.0 +google-auth-oauthlib==0.4.1 +google-pasta==0.1.8 +greenlet==0.4.15 +grpcio==1.25.0 +h5py==2.10.0 +idna==2.8 +image==1.5.27 +itsdangerous==1.1.0 +Jinja2==2.10.3 +Keras==2.3.1 +Keras-Applications==1.0.8 +Keras-Preprocessing==1.1.0 +kiwisolver==1.1.0 +Markdown==3.1.1 +MarkupSafe==1.1.1 +matplotlib==3.1.2 +numpy==1.17.4 +oauthlib==3.1.0 +opt-einsum==3.1.0 +pandas==0.25.3 +Pillow==6.2.1 +protobuf==3.11.1 +pyasn1==0.4.8 +pyasn1-modules==0.2.7 +pyparsing==2.4.5 +python-dateutil==2.8.1 +pytz==2019.3 +PyYAML==5.2 +requests==2.22.0 +requests-oauthlib==1.3.0 +rsa==4.0 +scipy==1.3.3 +six==1.13.0 +sqlparse==0.3.0 +tensorboard==2.0.2 +tensorflow==2.0.0 +tensorflow-estimator==2.0.1 +tensorflow-gpu==1.15.0 +termcolor==1.1.0 +tqdm==4.40.0 +urllib3==1.25.7 +Werkzeug==0.16.0 +wrapt==1.11.2