From c16fa095311dd156d53ad945afc95254844896e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20=C5=BDitn=C3=BD?= Date: Thu, 6 Feb 2025 17:47:08 +0100 Subject: [PATCH 1/3] Fix of NameError(missed fucntion call) --------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[49], line 4 1 INPUT_FILE = "./resources/extracted_text.txt" # Replace with your file path 2 CHUNK_SIZE = 1000 # Adjust chunk size if needed ----> 4 chunks = create_word_bounded_chunks(text, CHUNK_SIZE) 5 num_chunks = len(chunks) NameError: name 'text' is not defined --- .../NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/end-to-end-use-cases/NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb b/end-to-end-use-cases/NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb index 2cf5d38d3..a08997c15 100644 --- a/end-to-end-use-cases/NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb +++ b/end-to-end-use-cases/NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb @@ -469,10 +469,10 @@ "metadata": {}, "outputs": [], "source": [ - "INPUT_FILE = \"./resources/extracted_text.txt\" # Replace with your file path\n", + "INPUT_FILE = pdf_path # Replace with your file path\n", "CHUNK_SIZE = 1000 # Adjust chunk size if needed\n", "\n", - "chunks = create_word_bounded_chunks(text, CHUNK_SIZE)\n", + "chunks = create_word_bounded_chunks(extract_text_from_pdf(pdf_path), CHUNK_SIZE)\n", "num_chunks = len(chunks)\n" ] }, From 2d217cc9a90dcbdb4ba545f013cdf7ba2693be47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20=C5=BDitn=C3=BD?= <88278380+Yggdrasill501@users.noreply.github.com> Date: Thu, 6 Feb 2025 18:17:14 +0100 Subject: [PATCH 2/3] Update Step-1 PDF-Pre-Processing-Logic.ipynb --- .../NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/end-to-end-use-cases/NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb b/end-to-end-use-cases/NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb index a08997c15..f4f6bfdd7 100644 --- a/end-to-end-use-cases/NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb +++ b/end-to-end-use-cases/NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb @@ -469,7 +469,7 @@ "metadata": {}, "outputs": [], "source": [ - "INPUT_FILE = pdf_path # Replace with your file path\n", + "INPUT_FILE = "./resources/extracted_text.txt" # Replace with your file path\n", "CHUNK_SIZE = 1000 # Adjust chunk size if needed\n", "\n", "chunks = create_word_bounded_chunks(extract_text_from_pdf(pdf_path), CHUNK_SIZE)\n", From 8e45d549a1dc04441ed0af02b5348d9196e2d3a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20=C5=BDitn=C3=BD?= <88278380+Yggdrasill501@users.noreply.github.com> Date: Thu, 6 Feb 2025 18:22:26 +0100 Subject: [PATCH 3/3] Update Step-1 PDF-Pre-Processing-Logic.ipynb --- .../NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/end-to-end-use-cases/NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb b/end-to-end-use-cases/NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb index f4f6bfdd7..4120cdc33 100644 --- a/end-to-end-use-cases/NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb +++ b/end-to-end-use-cases/NotebookLlama/Step-1 PDF-Pre-Processing-Logic.ipynb @@ -469,7 +469,7 @@ "metadata": {}, "outputs": [], "source": [ - "INPUT_FILE = "./resources/extracted_text.txt" # Replace with your file path\n", + "INPUT_FILE = "./resources/extracted_text.txt\n", # Replace with your file path\n", "CHUNK_SIZE = 1000 # Adjust chunk size if needed\n", "\n", "chunks = create_word_bounded_chunks(extract_text_from_pdf(pdf_path), CHUNK_SIZE)\n",