use utf-8 encoding in json

This commit is contained in:
rasbt 2024-07-22 07:01:54 -05:00
parent fa56c80402
commit 46fcde15d8
No known key found for this signature in database
GPG Key ID: 3C6E5C7C075611DB

View File

@ -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": {