afatuddin commited on
Commit
0e20bb6
·
verified ·
1 Parent(s): 5342abb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -37,7 +37,7 @@ def get_pdf_text(pdf_docs):
37
  return documents
38
 
39
  @st.cache_data
40
- def get_text_chunks(documents):
41
  """
42
  Splits Document objects into chunks while preserving metadata.
43
  """
@@ -46,7 +46,7 @@ def get_text_chunks(documents):
46
  chunk_overlap=200
47
  )
48
  # split_documents ensures metadata (page num) is copied to new chunks
49
- chunks = text_splitter.split_documents(documents)
50
  return chunks
51
 
52
  # --- Hugging Face Model Functions ---
 
37
  return documents
38
 
39
  @st.cache_data
40
+ def get_text_chunks(_documents):
41
  """
42
  Splits Document objects into chunks while preserving metadata.
43
  """
 
46
  chunk_overlap=200
47
  )
48
  # split_documents ensures metadata (page num) is copied to new chunks
49
+ chunks = text_splitter.split_documents(_documents)
50
  return chunks
51
 
52
  # --- Hugging Face Model Functions ---