'ReadError: file could not be opened successfully. But I am not sure where the tar file is stored to resolve this
I am using biobert-embeddings==0.1.2
and torch==1.2.0
versions to embed some documents. But, I get the following error when I try to load the model by
from biobert_embedding.embedding import BiobertEmbedding
biobert = BiobertEmbedding()
Output/Error I get is -
Extracting biobert model tar.gz
ReadError: file could not be opened successfully
Solution 1:[1]
I was also having the same issue. Please follow the below steps to run the model:
- Download the model from the link https://www.dropbox.com/s/hvsemunmv0htmdk/biobert_v1.1_pubmed_pytorch_model.tar.gz?dl=0
- Extract all the files from the downloaded tar.gz file.
- Use code:
biobert = BiobertEmbedding(model_path = "location_you_installed")
Note: Please make sure "location_you_installed" has config.json, pytorch_model.bin, and vocab.text files. These files are obtained after step 2.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Neeti |