Spaces:
Runtime error
Runtime error
camphong24032002
commited on
Commit
•
08ce47a
1
Parent(s):
7d539eb
Test
Browse files- Dockerfile +3 -5
- app.py +0 -2
Dockerfile
CHANGED
@@ -14,14 +14,12 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
14 |
|
15 |
COPY . .
|
16 |
|
17 |
-
RUN chown -R 1000:1000 /code
|
18 |
-
|
19 |
ENV NKTL_DATA=/nltk_data
|
20 |
|
21 |
-
RUN
|
22 |
|
23 |
-
|
24 |
|
25 |
-
|
26 |
|
27 |
CMD ["python", "app.py"]
|
|
|
14 |
|
15 |
COPY . .
|
16 |
|
|
|
|
|
17 |
ENV NKTL_DATA=/nltk_data
|
18 |
|
19 |
+
RUN [ "python", "-c", "import nltk; nltk.download('stopwords', download_dir='/usr/local/nltk_data')" ]
|
20 |
|
21 |
+
RUN chown -R 1000:1000 /code
|
22 |
|
23 |
+
USER 1000
|
24 |
|
25 |
CMD ["python", "app.py"]
|
app.py
CHANGED
@@ -1,8 +1,6 @@
|
|
1 |
import pandas as pd
|
2 |
from sentence_transformers import SentenceTransformer, util
|
3 |
from flask import Flask, render_template, request, jsonify
|
4 |
-
import nltk
|
5 |
-
nltk.download('stopwords')
|
6 |
from nltk.corpus import stopwords
|
7 |
stop = stopwords.words('english')
|
8 |
|
|
|
1 |
import pandas as pd
|
2 |
from sentence_transformers import SentenceTransformer, util
|
3 |
from flask import Flask, render_template, request, jsonify
|
|
|
|
|
4 |
from nltk.corpus import stopwords
|
5 |
stop = stopwords.words('english')
|
6 |
|