let's download at import time instead

This commit is contained in:
Kevin Turcios 2024-09-09 19:59:29 -05:00
parent 3bea728595
commit dbd7a67aa7
2 changed files with 3 additions and 1 deletions

View file

@ -6,6 +6,9 @@ import libcst
from nltk.corpus import stopwords, words
from nltk.tokenize import word_tokenize
from optimizer.models import CodeExplanationAndID
import nltk
for corpus in ["words", "stopwords", "punkt_tab"]:
nltk.download(corpus)
mini_python_corpus = {'efficient', 'updates', 'updates', 'json_schema_update', 'handled', 'single', 'pass', 'making', 'process', 'method', 'extraction', 'clarity', 'extracted', 'processing', 'logic', 'fieldinfo', 'private', 'method',

View file

@ -10,5 +10,4 @@ else
export PORT=8000
fi
python -m nltk.downloader punkt_tab stopwords words
gunicorn -c gunicorn.conf.py aiservice.asgi:application --bind 0.0.0.0:"$PORT" --timeout 600 --workers 2