Skip to content

Commit d8f59a7

Browse files
committed
Contains instead of starts with
1 parent 218c8bf commit d8f59a7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

interpreter/terminal_interface/local_setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,13 @@ def download_model(models_dir, models, interpreter):
248248
if line.strip() and not line.startswith("failed") and not line.startswith("NAME")
249249
] # Extract names, trim out ":latest", skip header
250250

251-
# Models whose name start with one of these prefixes will be moved to the front of the list
251+
# Models whose name contain one of these keywords will be moved to the front of the list
252252
priority_models=["llama3","codestral"]
253253
priority_models_found=[]
254-
for prefix in priority_models:
255-
models_to_move=[name for name in names if name.startswith(prefix)]
254+
for word in priority_models:
255+
models_to_move=[name for name in names if word in name]
256256
priority_models_found.extend(models_to_move)
257-
names=[name for name in names if not any(name.startswith(prefix) for prefix in priority_models)]
257+
names=[name for name in names if not any(word in name for word in priority_models)]
258258
names=priority_models_found+names
259259

260260
for model in ["llama3", "phi3", "wizardlm2", "codestral"]:

0 commit comments

Comments
 (0)