Spaces:
Sleeping
Sleeping
Update services/kb_creation.py
Browse files- services/kb_creation.py +3 -2
services/kb_creation.py
CHANGED
|
@@ -15,8 +15,9 @@ collection = client.get_or_create_collection(name="knowledge_base")
|
|
| 15 |
# ------------------------- Embedding model ------------------------
|
| 16 |
# You can swap to a multilingual model if you expect mixed language queries:
|
| 17 |
# model = SentenceTransformer('paraphrase-multilingual-MiniLM-L12-v2')
|
| 18 |
-
MODEL_PATH = './models/all-MiniLM-L6-v2'
|
| 19 |
-
model = SentenceTransformer(MODEL_PATH)
|
|
|
|
| 20 |
|
| 21 |
# ------------------------- BM25 (lightweight) ---------------------
|
| 22 |
BM25_INDEX_FILE = os.path.join(CHROMA_PATH, "bm25_index.pkl")
|
|
|
|
| 15 |
# ------------------------- Embedding model ------------------------
|
| 16 |
# You can swap to a multilingual model if you expect mixed language queries:
|
| 17 |
# model = SentenceTransformer('paraphrase-multilingual-MiniLM-L12-v2')
|
| 18 |
+
#MODEL_PATH = './models/all-MiniLM-L6-v2'
|
| 19 |
+
#model = SentenceTransformer(MODEL_PATH)
|
| 20 |
+
model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
|
| 21 |
|
| 22 |
# ------------------------- BM25 (lightweight) ---------------------
|
| 23 |
BM25_INDEX_FILE = os.path.join(CHROMA_PATH, "bm25_index.pkl")
|