fix error
Browse files
app.py
CHANGED
@@ -19,8 +19,8 @@ def get_pdf_text(pdf_path):
|
|
19 |
return extract_text(pdf_path)
|
20 |
|
21 |
def get_pdf_text_chunks(pdf_text):
|
22 |
-
text_splitter = RecursiveCharacterTextSplitter()
|
23 |
-
return text_splitter.split_text(text=pdf_text
|
24 |
|
25 |
def create_vector_store(target_source_chunks):
|
26 |
embeddings = HuggingFaceEmbeddings(model_name=embeddings_model_name)
|
|
|
19 |
return extract_text(pdf_path)
|
20 |
|
21 |
def get_pdf_text_chunks(pdf_text):
|
22 |
+
text_splitter = RecursiveCharacterTextSplitter( max_chunk_length=1000, min_chunk_length=100, overlap_length=100)
|
23 |
+
return text_splitter.split_text(text=pdf_text)
|
24 |
|
25 |
def create_vector_store(target_source_chunks):
|
26 |
embeddings = HuggingFaceEmbeddings(model_name=embeddings_model_name)
|