I have an app that uses the Spacy model "en_core_web_sm". I have tested the app on my local machine and it works fine.
However when I deploy it to Heroku, it gives me this error:
"Can't find model 'en_core_web_sm'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory."
My requirements file contains spacy==2.2.4.
I have been doing some research on this error and found that the model needs to be downloaded separately using this command:
python -m spacy download en_core_web_sm
I have been looking for ways to add the same to my requirements.txt file but haven't been able to find one that works!
I tried this as well - added the below to the requirements file:
-e git://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.2.0/en_core_web_sm-2.2.0.tar.gz#egg=en_core_web_sm==2.2.0
but it gave this error:
"Cloning git://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.2.0/en_core_web_sm-2.2.0.tar.gz to /app/.heroku/src/en-core-web-sm
Running command git clone -q git://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.2.0/en_core_web_sm-2.2.0.tar.gz /app/.heroku/src/en-core-web-sm fatal: remote error: explosion/spacy-models/releases/download/en_core_web_sm-2.2.0/en_core_web_sm-2.2.0.tar.gz is not a valid repository name"
Is there a way to get this Spacy model to load from the requirements file? Or any other fix that is possible?
Thank you.