Spaces:
Sleeping
Sleeping
Mikeplockhart
commited on
Commit
•
2cbfdf4
1
Parent(s):
a2ee5aa
Update utils.py
Browse files
utils.py
CHANGED
@@ -27,7 +27,7 @@ def embedding_function(items_to_embed: list[str]):
|
|
27 |
)
|
28 |
print(len(embedded_items))
|
29 |
print(type(embedded_items[0]))
|
30 |
-
print(type(
|
31 |
return embedded_items
|
32 |
|
33 |
def chroma_upserting(collection, payload:list[dict]):
|
@@ -36,7 +36,7 @@ def chroma_upserting(collection, payload:list[dict]):
|
|
36 |
#for idx, item in enumerate(payload):
|
37 |
# print("printing item:")
|
38 |
# print(type(item))
|
39 |
-
embedding =
|
40 |
# print(type(embedding))
|
41 |
# collection.add(
|
42 |
# documents=item['doc'],
|
|
|
27 |
)
|
28 |
print(len(embedded_items))
|
29 |
print(type(embedded_items[0]))
|
30 |
+
print(type(embedded_items[0][0]))
|
31 |
return embedded_items
|
32 |
|
33 |
def chroma_upserting(collection, payload:list[dict]):
|
|
|
36 |
#for idx, item in enumerate(payload):
|
37 |
# print("printing item:")
|
38 |
# print(type(item))
|
39 |
+
embedding = (embedding_function([item['doc'] for item in payload))
|
40 |
# print(type(embedding))
|
41 |
# collection.add(
|
42 |
# documents=item['doc'],
|