sotiriskot commited on
Commit
9a62380
·
verified ·
1 Parent(s): c07144a

Create download_model.py

Browse files
Files changed (1) hide show
  1. 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
+ )