Spaces:
Sleeping
Sleeping
sotiriskot
commited on
Create download_model.py
Browse files- download_model.py +12 -0
download_model.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# download_model.py
|
2 |
+
from sentence_transformers import SentenceTransformer
|
3 |
+
import os
|
4 |
+
|
5 |
+
CACHE_DIR = "/app/src/fos/data"
|
6 |
+
|
7 |
+
model = SentenceTransformer(
|
8 |
+
"all-mpnet-base-v2",
|
9 |
+
cache_folder=CACHE_DIR,
|
10 |
+
torch_dtype="auto",
|
11 |
+
device_map="auto"
|
12 |
+
)
|