From d9d39b8138155041d16527e01a924ce287950903 Mon Sep 17 00:00:00 2001 From: Jerry Liu Date: Sat, 10 Aug 2024 00:15:34 -0700 Subject: [PATCH] cr --- .../multimodal_report_generation.ipynb | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/examples/multimodal/multimodal_report_generation.ipynb b/examples/multimodal/multimodal_report_generation.ipynb index e2f6471..a789bf4 100644 --- a/examples/multimodal/multimodal_report_generation.ipynb +++ b/examples/multimodal/multimodal_report_generation.ipynb @@ -380,16 +380,6 @@ "print(text_nodes[10].get_content(metadata_mode=\"all\"))" ] }, - { - "cell_type": "markdown", - "id": "4f404f56-db1e-4ed7-9ba1-ead763546348", - "metadata": {}, - "source": [ - "#### Build Index\n", - "\n", - "Once the text nodes are ready, we feed into our vector store index abstraction, which will index these nodes into a simple in-memory vector store (of course, you should definitely check out our 40+ vector store integrations!)" - ] - }, { "cell_type": "code", "execution_count": null, @@ -404,16 +394,14 @@ " load_index_from_storage,\n", ")\n", "\n", - "if not os.path.exists(\"storage_nodes_tmp_summary\"):\n", + "if not os.path.exists(\"storage_nodes_summary\"):\n", " index = SummaryIndex(text_nodes)\n", " # save index to disk\n", " index.set_index_id(\"summary_index\")\n", - " index.storage_context.persist(\"./storage_nodes_tmp_summary\")\n", + " index.storage_context.persist(\"./storage_nodes_summary\")\n", "else:\n", " # rebuild storage context\n", - " storage_context = StorageContext.from_defaults(\n", - " persist_dir=\"storage_nodes_tmp_summary\"\n", - " )\n", + " storage_context = StorageContext.from_defaults(persist_dir=\"storage_nodes_summary\")\n", " # load index\n", " index = load_index_from_storage(storage_context, index_id=\"summary_index\")" ]