MCPcopy Create free account
hub / github.com/Open-Quant/openquant / load_sentence_transformer

Function load_sentence_transformer

scripts/afml_semantic_index.py:345–349  ·  view source on GitHub ↗
(model_name: str, allow_online_model_fetch: bool)

Source from the content-addressed store, hash-verified

343
344
345def load_sentence_transformer(model_name: str, allow_online_model_fetch: bool) -> SentenceTransformer:
346 return SentenceTransformer(
347 model_name,
348 local_files_only=not allow_online_model_fetch,
349 )
350
351
352def build_index(args: argparse.Namespace) -> None:

Callers 3

_load_modelFunction · 0.90
build_indexFunction · 0.85
search_indexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected