Merge pull request #222 from Monadical-SAS/serverfix

Remove cache dir to use default download paths
This commit is contained in:
projects-g
2023-09-13 14:46:46 +05:30
committed by GitHub

View File

@@ -48,10 +48,9 @@ class LLM:
Make sure NLTK package is installed. Searches in the cache and Make sure NLTK package is installed. Searches in the cache and
downloads only if needed. downloads only if needed.
""" """
nltk.download("punkt", download_dir=settings.CACHE_DIR) nltk.download("punkt")
# For POS tagging # For POS tagging
nltk.download("averaged_perceptron_tagger", download_dir=settings.CACHE_DIR) nltk.download("averaged_perceptron_tagger")
nltk.data.path.append(settings.CACHE_DIR)
@classmethod @classmethod
def register(cls, name, klass): def register(cls, name, klass):