YchKhan commited on
Commit
c778b9c
1 Parent(s): 70d5c40

Update split_files_to_excel.py

Browse files
Files changed (1) hide show
  1. split_files_to_excel.py +3 -3
split_files_to_excel.py CHANGED
@@ -485,10 +485,10 @@ def split_doc_in_chunks(input_folder, base_folders, nb_pages):
485
  if nb_pages > 0:
486
  for sb_chunk in sb_chunks:
487
  print(f"CHUNK PAGENUM = {sb_chunk.metadata['page_number']}")
488
- if int(sb_chunk.metadata["page_number"])<nb_pages:
489
  chunks.append(sb_chunk)
490
- else:
491
- break
492
  else:
493
  chunks = sb_chunks
494
  print(f"Document splitted in {len(chunks)} chunks")
 
485
  if nb_pages > 0:
486
  for sb_chunk in sb_chunks:
487
  print(f"CHUNK PAGENUM = {sb_chunk.metadata['page_number']}")
488
+ if int(sb_chunk.metadata["page_number"])<=nb_pages:
489
  chunks.append(sb_chunk)
490
+ else:
491
+ break
492
  else:
493
  chunks = sb_chunks
494
  print(f"Document splitted in {len(chunks)} chunks")