Spaces:
Runtime error
Runtime error
khaiphan29
commited on
Commit
•
f22d81f
1
Parent(s):
e265cce
Upload folder using huggingface_hub
Browse files- Dockerfile +1 -1
- main.py +2 -0
Dockerfile
CHANGED
@@ -11,5 +11,5 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
11 |
|
12 |
COPY . .
|
13 |
|
14 |
-
RUN ["python3", "-m", "nltk.downloader", "
|
15 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
11 |
|
12 |
COPY . .
|
13 |
|
14 |
+
RUN ["python3", "-m", "nltk.downloader", "-d", "nltk_data"]
|
15 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
main.py
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
import os
|
3 |
os.environ['HF_HOME'] = 'src/cache'
|
4 |
os.environ['SENTENCE_TRANSFORMERS_HOME'] = 'src/cache'
|
|
|
|
|
5 |
|
6 |
from fastapi import FastAPI, status
|
7 |
from fastapi.responses import Response, JSONResponse
|
|
|
2 |
import os
|
3 |
os.environ['HF_HOME'] = 'src/cache'
|
4 |
os.environ['SENTENCE_TRANSFORMERS_HOME'] = 'src/cache'
|
5 |
+
os.environ['NLTK_DATA'] = 'nltk_data'
|
6 |
+
|
7 |
|
8 |
from fastapi import FastAPI, status
|
9 |
from fastapi.responses import Response, JSONResponse
|