I am trying to deploy an app that uses NLP using GENSIM library.
I included in requeriments.txt these components:
rouge==1.0.0
streamlit==0.80.0
gensim==4.0.1
altair==4.1.0
pandas==1.2.3
sumy==0.8.1
The deploy process starts ok, the gensim package is installed, but when the app will use, there is an error:
[client] Provisioning machine...
[manager] Starting up for owner: 'htsnet', repository: 'resumotexto', branch: 'main', main module: 'app.py'
[manager] Cloning repository ...
[manager] Cloning into 'resumotexto'...
[manager] Cloned repository!
[manager] Processing dependencies ...
Requirement already satisfied: numpy in /home/appuser/venv/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (1.20.2)
Requirement already satisfied: pandas in /home/appuser/venv/lib/python3.7/site-packages (from -r requirements.txt (line 2)) (1.2.3)
Collecting seaborn
Downloading seaborn-0.11.1-py3-none-any.whl (285 kB)
Requirement already satisfied: altair in /home/appuser/venv/lib/python3.7/site-packages (from -r requirements.txt (line 7)) (4.1.0)
**Collecting gensim**
Downloading gensim-4.0.1-cp37-cp37m-manylinux1_x86_64.whl (23.9 MB)
...
Installing collected packages: tqdm, smart-open, scipy, regex, lxml, kiwisolver, joblib, docopt, cycler, pycountry, pycorenlp, nltk, matplotlib, gensim, breadability, sumy, seaborn, rouge, gensim-sum-ext
...
/home/appuser/venv/lib/python3.7/site-packages/gensim/similarities/__init__.py:15: UserWarning: The gensim.similarities.levenshtein submodule is disabled, because the optional Levenshtein package <https://pypi.org/project/python-Levenshtein/> is unavailable. Install Levenhstein (e.g. `pip install python-Levenshtein`) to suppress this warning.
warnings.warn(msg)
2021-04-11 19:07:59.184 Uncaught app exception
Traceback (most recent call last):
File "/home/appuser/venv/lib/python3.7/site-packages/streamlit/script_runner.py", line 333, in _run_script
exec(code, module.__dict__)
File "/app/resumotexto/app.py", line 8, in <module>
from gensim.summarization import summarize
**ModuleNotFoundError: No module named 'gensim.summarization'**
Is there any mistake? What I did wrong? What I need to change?
The URL is https://share.streamlit.io/htsnet/resumotexto/main/app.py
The project is GitHub - htsnet/ResumoTexto
Thanks.