Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -701,7 +701,7 @@ with st.spinner('Wait for it...'):
|
|
701 |
data = process_pdf(bg_doc.name)
|
702 |
if str(data) not in dictionary['text_embeddings']:
|
703 |
dictionary['text_embeddings']={}
|
704 |
-
text_splitter = RecursiveCharacterTextSplitter(chunk_size=
|
705 |
chunks = text_splitter.split_documents(data)
|
706 |
|
707 |
dictionary['text_embeddings'][str(data)]={str(chunk.page_content):model.encode(str(chunk.page_content)) for chunk in chunks}
|
|
|
701 |
data = process_pdf(bg_doc.name)
|
702 |
if str(data) not in dictionary['text_embeddings']:
|
703 |
dictionary['text_embeddings']={}
|
704 |
+
text_splitter = RecursiveCharacterTextSplitter(chunk_size=4000, chunk_overlap=2000)
|
705 |
chunks = text_splitter.split_documents(data)
|
706 |
|
707 |
dictionary['text_embeddings'][str(data)]={str(chunk.page_content):model.encode(str(chunk.page_content)) for chunk in chunks}
|