Cyberbolt / Cemotion

A Chinese NLP library based on BERT for sentiment analysis and general-purpose Chinese word segmentation. | 基于 BERT 的中文 NLP 库,用于中文情感倾向分析、通用领域中文分词。
MIT License
187 stars 22 forks source link

Bug report #7

Closed NEOE-PY closed 11 months ago

NEOE-PY commented 1 year ago

OSError: Can't load tokenizer for 'bert-base-chinese'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'bert-base-chinese' is the correct path to a directory containing all relevant files for a BertTokenizer tokenizer.

When I download Cemotion using a virtual environment that contains the pytorch framework, using it on a jupyternotebook, it shows the above error. So I downloaded the bert-base-Chinese file, but it still shows the error, please ask me if the file path is wrong

OS: [win] Python Version 3.9 Package Version cemotion 2.0 pytorch 2.0.1 transformers 4.24.0

Cyberbolt commented 12 months ago

Please try installing Cemotion in a pure Python environment. It is recommended to use conda to create a new virtual environment.