MCPcopy Create free account
hub / github.com/algorithmicsuperintelligence/optillm / download_model

Function download_model

optillm/plugins/privacy_plugin.py:74–82  ·  view source on GitHub ↗
(model_name)

Source from the content-addressed store, hash-verified

72 return OperatorType.Anonymize
73
74def download_model(model_name):
75 global _model_downloaded
76 if not _model_downloaded:
77 if not spacy.util.is_package(model_name):
78 print(f"Downloading {model_name} model...")
79 spacy.cli.download(model_name)
80 else:
81 print(f"{model_name} model already downloaded.")
82 _model_downloaded = True
83
84def replace_entities(entity_map, text):
85 # Create a reverse mapping of placeholders to entity names

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected