Skip to content

Commit dd42a26

Browse files
committed
Update _get_model_class usage now that it's no longer a property
1 parent 2211e4d commit dd42a26

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

python/zvec/extension/sentence_transformer_function.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ def _get_model(self):
115115

116116
# Load model
117117
try:
118+
model_class = self._get_model_class()
118119
if self._model_source == "modelscope":
119120
# Load from ModelScope
120121
require_module("modelscope")
@@ -124,12 +125,12 @@ def _get_model(self):
124125
model_dir = snapshot_download(self._model_name)
125126

126127
# Load from local path
127-
self._model = self._get_model_class(
128+
self._model = model_class(
128129
model_dir, device=self._device, trust_remote_code=True
129130
)
130131
else:
131132
# Load from Hugging Face (default)
132-
self._model = self._get_model_class(
133+
self._model = model_class(
133134
self._model_name, device=self._device, trust_remote_code=True
134135
)
135136

0 commit comments

Comments
 (0)