File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -584,15 +584,15 @@ def get_pooling_config_name(pooling_name: str) -> Union[str, None]:
584584
585585
586586@cache
587- def get_sentence_transformer_tokenizer_config (model : str ,
587+ def get_sentence_transformer_tokenizer_config (model : Union [ str , Path ] ,
588588 revision : Optional [str ] = 'main'
589589 ):
590590 """
591591 Returns the tokenization configuration dictionary for a
592592 given Sentence Transformer BERT model.
593593
594594 Parameters:
595- - model (str): The name of the Sentence Transformer
595+ - model (str|Path ): The name of the Sentence Transformer
596596 BERT model.
597597 - revision (str, optional): The revision of the m
598598 odel to use. Defaults to 'main'.
@@ -620,7 +620,7 @@ def get_sentence_transformer_tokenizer_config(model: str,
620620 if encoder_dict :
621621 break
622622
623- if not encoder_dict and not model . startswith ( "/" ):
623+ if not encoder_dict and not Path ( model ). is_absolute ( ):
624624 try :
625625 # If model is on HuggingfaceHub, get the repo files
626626 repo_files = list_repo_files (model ,
You can’t perform that action at this time.
0 commit comments