Vision-CAIR / MiniGPT4-video

Official code for Goldfish model for long video understanding and MiniGPT4-video for short video understanding
https://vision-cair.github.io/Goldfish_website/
BSD 3-Clause "New" or "Revised" License
559 stars 60 forks source link

OSError: Can't load tokenizer for 'bert-base-uncased' #39

Open orzgugu opened 1 month ago

orzgugu commented 1 month ago

Hello! I ran python minigpt4_video_inference.py and reported an error File "/ home/pai/envs/goldfish/lib/python3.9 / site - packages/transformers/tokenization_utils_base. Py", line 2013, in from_pretrained raise EnvironmentError( OSError: Can't load tokenizer for 'bert-base-uncased'. 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-uncased' is the correct path to a directory containing all relevant files for a BertTokenizer tokenizer. I refer to the methods on the Internet, and some say it is caused by the version of the transformers package, but I used the latest Transformers package or transformers==4.37.2 to solve this problem. Looking forward to your reply and help!

orzgugu commented 1 month ago

Already solved, download the model and replace the path

你好! 我运行python minigpt4_video_inference.py时报错File "/home/pai/envs/goldfish/lib/python3.9/site-packages/transformers/tokenization_utils_base.py", line 2013, in from_pretrained raise EnvironmentError( OSError: Can't load tokenizer for 'bert-base-uncased'. 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. Others, make sure 'bert-base-uncased' is the correct path to a directory including all related files for a BertTokenizer tokenizer. 我参考了网上的方法,有的说是transformers包版本导致的,不过我用了最新的Transformers包或者transformers==4.37.2才解决了这个问题。 期待你的回复和帮助!