ppsingh commited on
Commit
40cbe96
·
verified ·
1 Parent(s): d5b874c

Update auditqa/process_chunks.py

Browse files
Files changed (1) hide show
  1. auditqa/process_chunks.py +16 -16
auditqa/process_chunks.py CHANGED
@@ -69,23 +69,23 @@ def load_chunks():
69
  # placeholder for collection
70
  qdrant_collections = {}
71
  print("embeddings started")
72
- batch_size = 1000 # Adjust this value based on your system's memory capacity
73
- for i in range(0, len(chunks_list), batch_size):
74
- print("embedding",(i+batch_size)/1000)
75
- batch_docs = chunks_list[i:i+batch_size]
76
- qdrant = Qdrant.from_documents(
77
- batch_docs, embeddings,
78
- path="/data/local_qdrant",
79
- recreate_collection=False,
80
- collection_name='reportsFeb2025',
81
- )
82
 
83
- #qdrant_collections['reportsFeb2025'] = Qdrant.from_documents(
84
- # chunks_list,
85
- # embeddings,
86
- # path="/data/local_qdrant",
87
- # collection_name='reportsFeb2025',
88
- # )
89
  print(qdrant_collections)
90
  print("vector embeddings done")
91
  return qdrant_collections
 
69
  # placeholder for collection
70
  qdrant_collections = {}
71
  print("embeddings started")
72
+ #batch_size = 1000 # Adjust this value based on your system's memory capacity
73
+ #for i in range(0, len(chunks_list), batch_size):
74
+ # print("embedding",(i+batch_size)/1000)
75
+ # batch_docs = chunks_list[i:i+batch_size]
76
+ # qdrant = Qdrant.from_documents(
77
+ # batch_docs, embeddings,
78
+ # path="/data/local_qdrant",
79
+ # recreate_collection=False,
80
+ # collection_name='reportsFeb2025',
81
+ # )
82
 
83
+ qdrant_collections['reportsFeb2025'] = Qdrant.from_documents(
84
+ chunks_list,
85
+ embeddings,
86
+ path="/data/local_qdrant",
87
+ collection_name='reportsFeb2025',
88
+ )
89
  print(qdrant_collections)
90
  print("vector embeddings done")
91
  return qdrant_collections