wholewhale commited on
Commit
dc60e72
·
1 Parent(s): 9c04c52

stuffing update

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -34,9 +34,10 @@ def pdf_changes(pdf_doc):
34
  # Initialize summary variable
35
  full_summary = ""
36
 
37
- # Divide the text into smaller chunks, for example 3 pages per chunk
38
  for i in range(0, len(texts), 3):
39
- chunk = " ".join(texts[i:i+3])
 
40
 
41
  # Load the summarization chain with stuffing method
42
  stuff_chain = load_summarize_chain(vertex_llm_text, chain_type="stuff", prompt=prompt)
 
34
  # Initialize summary variable
35
  full_summary = ""
36
 
37
+ # Divide the text into smaller chunks, for example, 3 pages per chunk
38
  for i in range(0, len(texts), 3):
39
+ chunk = " ".join([doc.text for doc in texts[i:i+3]]) # Modified line
40
+
41
 
42
  # Load the summarization chain with stuffing method
43
  stuff_chain = load_summarize_chain(vertex_llm_text, chain_type="stuff", prompt=prompt)