biobert-pytorch icon indicating copy to clipboard operation
biobert-pytorch copied to clipboard

TypeError: TextInputSequence must be str

Open Wangrulin-1128 opened this issue 1 year ago • 2 comments

I run the code of RE , meeting this problem "TypeError: TextInputSequence must be str". How can I solve it? thanks

Wangrulin-1128 avatar Sep 04 '23 09:09 Wangrulin-1128

I met same problem when run question-answering. :((

Pxtri2156 avatar Sep 28 '23 02:09 Pxtri2156

I fixed the error by creating a new environment with python3.7. To begin, I had a conda environment with python 3.11 and pytorch 2.0, then not compatible with the requirement "transformers == 3.0.0", so I installed transformers 4.33, I thought that was a problem. Thus, I created a new environment with python 3.7 that can install "transformers == 3.0.0". This is my solution.

Pxtri2156 avatar Sep 28 '23 07:09 Pxtri2156