castorini / bertserini

BERTserini
https://github.com/castorini/bertserini
Apache License 2.0
25 stars 10 forks source link

Error while running the simple example in README #16

Closed raj26000 closed 2 years ago

raj26000 commented 2 years ago

Hi, I tried cloning the repo in google colab and running the example given in README. However, I encounter a persistent error in the following line: (No Module error) from transformers.tokenization_bert import BasicTokenizer from this file: [https://github.com/rsvp-ai/bertserini/blob/development/bertserini/utils/utils_squad.py]()

Could anyone help?

riccardobosio commented 2 years ago

Try to put transformers==3.5 in the requirements.txt. I used it and it worked.

Otherwise you can use: from transformers import BertTokenizer