Skip to content

Commit a3793a4

Browse files
committed
fix
1 parent 23bbbf9 commit a3793a4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ RUN pip3 install -U nltk
1414
RUN python3 -m nltk.downloader popular
1515
RUN pip3 install -U numpy
1616
RUN pip3 install -r requirements.txt
17-
RUN python3 detox_engine.py
17+
# prepare classifier and vectorizer so webapp will start up faster
18+
RUN python3 ./detox_engine.py
1819
ENTRYPOINT ["python3"]
1920
CMD ["webapp.py"]
2021

webapp.py

+2
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,5 @@ def handle_my_custom_event(msg, methods=['GET', 'POST']):
4949
if __name__ == '__main__':
5050
port = int(os.environ.get('PORT', 5000))
5151
socketio.run(app, debug=True, host='0.0.0.0', port=port)
52+
53+
print("application has started.")

0 commit comments

Comments
 (0)