From 46fcde15d81017aef04664fae34cc538547cf57c Mon Sep 17 00:00:00 2001 From: rasbt Date: Mon, 22 Jul 2024 07:01:54 -0500 Subject: [PATCH] use utf-8 encoding in json --- ch07/01_main-chapter-code/ch07.ipynb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ch07/01_main-chapter-code/ch07.ipynb b/ch07/01_main-chapter-code/ch07.ipynb index f57cc87..004c55e 100644 --- a/ch07/01_main-chapter-code/ch07.ipynb +++ b/ch07/01_main-chapter-code/ch07.ipynb @@ -48,10 +48,10 @@ "name": "stdout", "output_type": "stream", "text": [ - "matplotlib version: 3.8.4\n", - "tiktoken version: 0.6.0\n", - "torch version: 2.2.2\n", - "tqdm version: 4.66.2\n", + "matplotlib version: 3.9.0\n", + "tiktoken version: 0.7.0\n", + "torch version: 2.3.1\n", + "tqdm version: 4.66.4\n", "tensorflow version: 2.16.1\n" ] } @@ -146,7 +146,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "id": "0G3axLw6kY1N", "metadata": { "colab": { @@ -181,7 +181,7 @@ " with open(file_path, \"r\", encoding=\"utf-8\") as file:\n", " text_data = file.read()\n", "\n", - " with open(file_path, \"r\") as file:\n", + " with open(file_path, \"r\", encoding=\"utf-8\") as file:\n", " data = json.load(file)\n", "\n", " return data\n", @@ -209,7 +209,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "id": "-LiuBMsHkzQV", "metadata": { "colab": {