File tree 4 files changed +27
-11
lines changed
4 files changed +27
-11
lines changed Original file line number Diff line number Diff line change @@ -5,5 +5,6 @@ Dockerfile
5
5
README.md
6
6
CODE_OF_CONDUCT.md
7
7
LICENSE
8
- env. *
9
- devops
8
+ __pycache__
9
+ .vscode
10
+ Procfile
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:18.04
2
- MAINTAINER Wonhee Jung
"[email protected] "
2
+ ENV TERM xterm
3
+ ENV LC_ALL C.UTF-8
4
+ ENV FLASK_APP webapp.py
5
+ LABEL maintainer=
"Wonhee Jung([email protected] )"
6
+
3
7
RUN apt-get update && apt-get install -y \
4
8
software-properties-common
5
9
RUN add-apt-repository universe
6
10
RUN apt-get update && apt-get install -y \
7
11
curl \
8
12
git \
9
13
python3.6 \
10
- python3-pip
11
- COPY . /app
14
+ python3-pip && \
15
+ rm -rf /var/lib/apt/lists/*
16
+
17
+ COPY requirements.txt /requirements.txt
18
+
19
+ RUN pip3 install --upgrade pip
20
+ RUN pip3 install -r requirements.txt && \
21
+ pip freeze
22
+
12
23
WORKDIR /app
13
- RUN pip3 install -U nltk
24
+ EXPOSE 5000
25
+
26
+ COPY . /app
27
+
28
+
14
29
RUN python3 -m nltk.downloader popular
15
- RUN pip3 install -U numpy
16
- RUN pip3 install -r requirements.txt
30
+
17
31
# prepare classifier and vectorizer so webapp will start up faster
18
32
RUN python3 ./detox_engine.py
19
- ENTRYPOINT ["python3" ]
20
- CMD ["webapp.py" ]
33
+ ENTRYPOINT ["python3" , "-u" ]
34
+ CMD ["/app/ webapp.py" ]
21
35
22
- EXPOSE 5000
Original file line number Diff line number Diff line change 17
17
import numpy as np
18
18
import pandas as pd
19
19
from joblib import dump , load
20
+ from nltk import word_tokenize ,sent_tokenize
20
21
from nltk .stem import WordNetLemmatizer
21
22
from sklearn .feature_extraction .text import TfidfVectorizer
22
23
from sklearn .naive_bayes import MultinomialNB
Original file line number Diff line number Diff line change 4
4
joblib
5
5
sklearn
6
6
gevent
7
+ gevent-websocket
7
8
flask
8
9
flask_socketio
9
10
flask_sockets
You can’t perform that action at this time.
0 commit comments