singhankur01 commited on
Commit
9fd8219
·
verified ·
1 Parent(s): ab2b82c

Create scripts/download_model.py

Browse files
Files changed (1) hide show
  1. scripts/download_model.py +13 -0
scripts/download_model.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from sentence_transformers import SentenceTransformer
2
+ import os
3
+
4
+ model_path = "models/all-MiniLM-L6-v2"
5
+
6
+ # Only download if not already present
7
+ if not os.path.exists(model_path):
8
+ print("📦 Downloading SentenceTransformer model...")
9
+ model = SentenceTransformer("all-MiniLM-L6-v2")
10
+ model.save(model_path)
11
+ print("✅ Model saved to:", model_path)
12
+ else:
13
+ print("✅ Model already exists, skipping download.")