Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -101,8 +101,9 @@ def merge_split_docs_to_db(split_docs,db,progress,progress_step=0.1):
|
|
101 |
for i in range(0, len(split_docs), batch):
|
102 |
progress(i/len(split_docs),desc=f"added {i} chunks of {len(split_docs)} chunks")
|
103 |
db1 = FAISS.from_documents(split_docs[i:i+batch], embeddings)
|
104 |
-
db.merge_from(db1)
|
105 |
-
|
|
|
106 |
|
107 |
def merge_pdf_to_db(filename,db,progress,progress_step=0.1):
|
108 |
progress_step+=0.05
|
|
|
101 |
for i in range(0, len(split_docs), batch):
|
102 |
progress(i/len(split_docs),desc=f"added {i} chunks of {len(split_docs)} chunks")
|
103 |
db1 = FAISS.from_documents(split_docs[i:i+batch], embeddings)
|
104 |
+
#db.merge_from(db1)
|
105 |
+
db1.merge_from(db)
|
106 |
+
return db1
|
107 |
|
108 |
def merge_pdf_to_db(filename,db,progress,progress_step=0.1):
|
109 |
progress_step+=0.05
|