Hi! I’ve been having trouble getting
transformers to work in Spaces.
When tested in my environment using
python -c "from transformers import pipeline; print(pipeline('sentiment-analysis')('we love you'))", the results show it’s been properly installed. When imported in Colab it works fine too, but whenever deployed to Spaces it always returns the same ModuleNotFound error. Full traceback message:
File "/home/user/.local/lib/python3.8/site-packages/streamlit/script_runner.py", line 354, in _run_script exec(code, module.__dict__)File "/home/user/app/app.py", line 1, in <module> from transformers import pipeline
It’s a simple test app using
streamlit, - both of which were reinstalled with pip after creating a new venv and reinstalling tensorflow and pytorch. I also tried cleaning, uninstalling, and reinstalling conda based on advice from another forum. No dice.
Any help greatly appreciated! Thanks