Skip to content

Commit a06040d

Browse files
authored
Update ingest.py
1 parent 28656b5 commit a06040d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ingest.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ def pageextract(texts):
2020
PAGES=[]
2121
id=0
2222
while id<len(texts):
23-
if (texts[id].metadata['page']-7)==len(PAGES):
23+
if (texts[id].metadata['page'])==len(PAGES):
2424
temp=''
25-
while id<len(texts) and (texts[id].metadata['page']-7)==len(PAGES) :
25+
while id<len(texts) and (texts[id].metadata['page'])==len(PAGES) :
2626
temp=temp+texts[id].page_content
2727
id=id+1
2828
PAGES.append(copy.deepcopy(texts[0]))
@@ -41,4 +41,4 @@ def makedb(chunks,embeddings):
4141
def INGESTER():
4242
chunks=getdoctext("data")
4343
embeddings = SentenceTransformerEmbeddings(model_name="all-MiniLM-L6-v2")
44-
makedb(chunks,embeddings)
44+
makedb(chunks,embeddings)

0 commit comments

Comments
 (0)