From 7cda7e2df7997b87264de69d801be0c0c9e13ab6 Mon Sep 17 00:00:00 2001 From: ys64 <815824+ys64@users.noreply.github.com> Date: Mon, 11 Sep 2023 14:54:40 -0700 Subject: [PATCH] add the last chunk to the list of chunks in web-qa.ipynb (#691) --- apps/web-crawl-q-and-a/web-qa.ipynb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/web-crawl-q-and-a/web-qa.ipynb b/apps/web-crawl-q-and-a/web-qa.ipynb index ebe39af..87c530d 100644 --- a/apps/web-crawl-q-and-a/web-qa.ipynb +++ b/apps/web-crawl-q-and-a/web-qa.ipynb @@ -780,6 +780,10 @@ " chunk.append(sentence)\n", " tokens_so_far += token + 1\n", "\n", + " # Add the last chunk to the list of chunks\n", + " if chunk:\n", + " chunks.append(\". \".join(chunk) + \".\")\n", + "\n", " return chunks\n", " \n", "\n",