Spaces:
Build error
Build error
Add instructor model (#6)
Browse files- Add instructor model (9c6f23df2753bb8f9b1441f7eaa9cc1ca565d260)
- utils/vector_index.py +1 -1
utils/vector_index.py
CHANGED
@@ -5,7 +5,7 @@ def create_dense_embeddings(query, model, instruction=None):
|
|
5 |
if instruction == None:
|
6 |
dense_emb = model.encode([query]).tolist()
|
7 |
else:
|
8 |
-
dense_emb = model.
|
9 |
return dense_emb
|
10 |
|
11 |
|
|
|
5 |
if instruction == None:
|
6 |
dense_emb = model.encode([query]).tolist()
|
7 |
else:
|
8 |
+
dense_emb = model.encode([[instruction, query]]).tolist()
|
9 |
return dense_emb
|
10 |
|
11 |
|