Spaces:
Sleeping
Sleeping
Mikeplockhart
commited on
Commit
•
70ff032
1
Parent(s):
361ac5d
Update utils.py
Browse files
utils.py
CHANGED
@@ -23,18 +23,16 @@ def embedding_function(items_to_embed: list[str]):
|
|
23 |
"mixedbread-ai/mxbai-embed-large-v1"
|
24 |
)
|
25 |
embedded_items = sentence_model.encode(
|
26 |
-
items_to_embed
|
27 |
-
convert_to_numpy=False,
|
28 |
-
convert_to_tensor=False
|
29 |
)
|
30 |
print(len(embedded_items))
|
31 |
print(type(embedded_items[0]))
|
32 |
print(type(embedded_items[0][0]))
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
return
|
38 |
|
39 |
def chroma_upserting(collection, payload:list[dict]):
|
40 |
print('upserting')
|
|
|
23 |
"mixedbread-ai/mxbai-embed-large-v1"
|
24 |
)
|
25 |
embedded_items = sentence_model.encode(
|
26 |
+
items_to_embed
|
|
|
|
|
27 |
)
|
28 |
print(len(embedded_items))
|
29 |
print(type(embedded_items[0]))
|
30 |
print(type(embedded_items[0][0]))
|
31 |
+
embedded_list = [item.tolist() for item in embedded_items]
|
32 |
+
print(len(embedded_list))
|
33 |
+
print(type(embedded_list[0]))
|
34 |
+
print(type(embedded_list[0][0]))
|
35 |
+
return embedded_list
|
36 |
|
37 |
def chroma_upserting(collection, payload:list[dict]):
|
38 |
print('upserting')
|