SushmithaCh commited on
Commit
67c4961
·
verified ·
1 Parent(s): 92cd06e

Upload embedding_and_storing.py

Browse files
Files changed (1) hide show
  1. embedding_and_storing.py +5 -8
embedding_and_storing.py CHANGED
@@ -21,14 +21,11 @@ def embed_and_store(chunks, ids, metadatas, client):
21
  if collections.get()["ids"]:
22
  collections.delete(collections.get()["ids"])
23
 
24
- print(collections.get())
25
-
26
  collections.add(
27
- ids=ids,
28
- embeddings=embeddings,
29
- metadatas=metadatas,
30
- documents=chunks
31
  )
32
- print("\n-------------------")
33
- print(collections.get(include=['metadatas','documents','embeddings']))
34
  return collections
 
21
  if collections.get()["ids"]:
22
  collections.delete(collections.get()["ids"])
23
 
 
 
24
  collections.add(
25
+ ids=ids,
26
+ embeddings=embeddings,
27
+ metadatas=metadatas,
28
+ documents=chunks
29
  )
30
+ print(f"ChromaDB ready — {len(chunks)} chunks indexed")
 
31
  return collections