From d37453e93105d05a1a8e630b1ed288fbc0ea9818 Mon Sep 17 00:00:00 2001 From: Aleksandr Mokrov Date: Tue, 17 Sep 2024 20:22:28 +0200 Subject: [PATCH] Fix decoding error during writing files on windows for internvl2 notebook (#2396) CVS-152591 --- notebooks/internvl2/internvl2.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/notebooks/internvl2/internvl2.ipynb b/notebooks/internvl2/internvl2.ipynb index 7baaeaca3c3..72281c1928e 100644 --- a/notebooks/internvl2/internvl2.ipynb +++ b/notebooks/internvl2/internvl2.ipynb @@ -63,19 +63,19 @@ "\n", "if not Path(\"conversation.py\").exists():\n", " r = requests.get(\"https://huggingface.co/OpenGVLab/InternVL2-1B/raw/main/conversation.py\")\n", - " open(\"conversation.py\", \"w\").write(r.text)\n", + " open(\"conversation.py\", \"w\", encoding=\"utf-8\").write(r.text)\n", "\n", "if not Path(\"internvl2_helper.py\").exists():\n", " r = requests.get(url=\"https://raw.githubusercontent.com/openvinotoolkit/openvino_notebooks/latest/notebooks/internvl2/internvl2_helper.py\")\n", - " open(\"internvl2_helper.py\", \"w\").write(r.text)\n", + " open(\"internvl2_helper.py\", \"w\", encoding=\"utf-8\").write(r.text)\n", "\n", "if not Path(\"gradio_helper.py\").exists():\n", " r = requests.get(url=\"https://raw.githubusercontent.com/openvinotoolkit/openvino_notebooks/latest/notebooks/internvl2/gradio_helper.py\")\n", - " open(\"gradio_helper.py\", \"w\").write(r.text)\n", + " open(\"gradio_helper.py\", \"w\", encoding=\"utf-8\").write(r.text)\n", "\n", "if not Path(\"notebook_utils.py\").exists():\n", " r = requests.get(url=\"https://raw.githubusercontent.com/openvinotoolkit/openvino_notebooks/latest/utils/notebook_utils.py\")\n", - " open(\"notebook_utils.py\", \"w\").write(r.text)" + " open(\"notebook_utils.py\", \"w\", encoding=\"utf-8\").write(r.text)" ] }, {