File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
2
import shlex
3
3
import subprocess
4
+ import time
4
5
from pathlib import Path
5
6
6
7
from huggingface_hub import snapshot_download
7
8
8
9
print (f"Download model..." )
9
10
base_path = (Path (__file__ ).parent ).resolve ()
10
11
11
- # Model 1:
12
- print ("Downloading model 1..." )
13
- snapshot_download (repo_id = "NumbersStation/nsql-llama-2-7B" , cache_dir = f"{ base_path } /models/" )
14
- # Model 2:
15
- print ("Downloading model 2..." )
16
- snapshot_download (repo_id = "defog/sqlcoder2" , cache_dir = f"{ base_path } /models/" )
12
+ MODEL_CHOICE_MAP = {
13
+ "h2ogpt-sql-sqlcoder2" : "defog/sqlcoder2" ,
14
+ "h2ogpt-sql-nsql-llama-2-7B" : "NumbersStation/nsql-llama-2-7B" ,
15
+ }
16
+
17
+ for _m in MODEL_CHOICE_MAP .values ():
18
+ print (f"Downloading { _m } ..." , flush = True )
19
+ snapshot_download (repo_id = _m , cache_dir = f"{ base_path } /models/" )
20
+ time .sleep (3 )
21
+
17
22
print (f"Download embedding model..." )
18
23
snapshot_download (repo_id = "BAAI/bge-base-en" , cache_dir = f"{ base_path } /models/sentence_transformers/" )
19
24
You can’t perform that action at this time.
0 commit comments