Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Tongjilibo committed Dec 28, 2023
1 parent 0337f15 commit 68fffc6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bert4torch/pipelines/text2vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ class Text2Vec:
:param model_config: dict, build_transformer_model时候用到的一些参数
'''
def __init__(self, model_path, device='cpu', **kwargs) -> None:
if not os.path.exists(model_path):
raise FileNotFoundError(f'model_path: {model_path} does not exists')

self.model_path = model_path
self.device = device
self.tokenizer = self.build_tokenizer()
Expand Down

0 comments on commit 68fffc6

Please sign in to comment.