From 241229a0762d34aa25d5dcd36447dc7345a2e019 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Do=C4=9Fan=20Keskin?=
 <98788987+DoganK01@users.noreply.github.com>
Date: Thu, 14 Mar 2024 00:04:41 +0300
Subject: [PATCH] Fix Visualization for Query Pipeline notebook (#11880)

---
 .../pipeline/query_pipeline_sql.ipynb         | 31 +++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

diff --git a/docs/examples/pipeline/query_pipeline_sql.ipynb b/docs/examples/pipeline/query_pipeline_sql.ipynb
index 6eb5c05637..a77ceecca7 100644
--- a/docs/examples/pipeline/query_pipeline_sql.ipynb
+++ b/docs/examples/pipeline/query_pipeline_sql.ipynb
@@ -570,8 +570,35 @@
     "from pyvis.network import Network\n",
     "\n",
     "net = Network(notebook=True, cdn_resources=\"in_line\", directed=True)\n",
-    "net.from_nx(qp.dag)\n",
-    "net.show(\"text2sql_dag.html\")"
+    "net.from_nx(qp.dag)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "id": "e1843ac9",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "# Save the network as \"text2sql_dag.html\"\n",
+    "net.write_html(\"text2sql_dag.html\")"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "id": "b4830b08",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from IPython.display import display, HTML\n",
+    "\n",
+    "# Read the contents of the HTML file\n",
+    "with open(\"text2sql_dag.html\", \"r\") as file:\n",
+    "    html_content = file.read()\n",
+    "\n",
+    "# Display the HTML content\n",
+    "display(HTML(html_content))"
    ]
   },
   {
-- 
GitLab