Spaces:
Sleeping
Sleeping
Erythrocyte3803
commited on
Commit
•
232a7d0
1
Parent(s):
2f34cd6
UPDATE
Browse files- Dockerfile +1 -1
- app.py +2 -0
Dockerfile
CHANGED
@@ -4,7 +4,6 @@ WORKDIR /app
|
|
4 |
|
5 |
ENV NUMBA_CACHE_DIR=/app/cache
|
6 |
RUN mkdir -p /app/cache
|
7 |
-
RUN chmod -R 777 ./*
|
8 |
|
9 |
COPY ./requirements.txt requirements.txt
|
10 |
|
@@ -12,4 +11,5 @@ RUN pip install --no-cache-dir torch torchvision torchaudio
|
|
12 |
RUN pip install --no-cache-dir -r requirements.txt
|
13 |
|
14 |
COPY . /app/
|
|
|
15 |
CMD ["python", "app.py"]
|
|
|
4 |
|
5 |
ENV NUMBA_CACHE_DIR=/app/cache
|
6 |
RUN mkdir -p /app/cache
|
|
|
7 |
|
8 |
COPY ./requirements.txt requirements.txt
|
9 |
|
|
|
11 |
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
|
13 |
COPY . /app/
|
14 |
+
RUN chmod -R 777 /app/*
|
15 |
CMD ["python", "app.py"]
|
app.py
CHANGED
@@ -152,8 +152,10 @@ from pathlib import Path
|
|
152 |
import config as global_config
|
153 |
import logging
|
154 |
import subprocess
|
|
|
155 |
|
156 |
appkey = os.getenv("app_key")
|
|
|
157 |
|
158 |
class DefaultRefer:
|
159 |
def __init__(self, path, text, language):
|
|
|
152 |
import config as global_config
|
153 |
import logging
|
154 |
import subprocess
|
155 |
+
import nltk
|
156 |
|
157 |
appkey = os.getenv("app_key")
|
158 |
+
nltk.data.path.append("./nltk_data")
|
159 |
|
160 |
class DefaultRefer:
|
161 |
def __init__(self, path, text, language):
|