You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the model that is automatically downloaded in the code
2024-09-10 11:25:08,617 - ERROR - An error occurred in the main function: slice(-1000, None, None)
2024-09-10 11:25:08,618 - ERROR - Traceback (most recent call last):
File "F:\download\pyenv\llm_aided_ocr\llm_aided_ocr.py", line 660, in main
final_text = await process_document(list_of_extracted_text_strings, reformat_as_markdown, suppress_headers_and_page_numbers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\download\pyenv\llm_aided_ocr\llm_aided_ocr.py", line 568, in process_document
processed_chunks = await process_chunks(chunks, reformat_as_markdown, suppress_headers_and_page_numbers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\download\pyenv\llm_aided_ocr\llm_aided_ocr.py", line 515, in process_chunks
processed_chunk, context = await process_chunk(chunk, context, i, total_chunks, reformat_as_markdown, suppress_headers_and_page_numbers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\download\pyenv\llm_aided_ocr\llm_aided_ocr.py", line 501, in process_chunk
new_context = processed_chunk[-1000:] # Use the last 1000 characters as context for the next chunk
~~~~~~~~~~~~~~~^^^^^^^^
KeyError: slice(-1000, None, None)
Why am I reporting the following error:
KeyError: slice(-1000, None, None)
The text was updated successfully, but these errors were encountered: