Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local model #20

Open
huongyj opened this issue Sep 10, 2024 · 1 comment
Open

local model #20

huongyj opened this issue Sep 10, 2024 · 1 comment

Comments

@huongyj
Copy link

huongyj commented Sep 10, 2024

Why am I reporting the following error:
KeyError: slice(-1000, None, None)

@huongyj
Copy link
Author

huongyj commented Sep 10, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant