{ "cells": [ { "cell_type": "code", "execution_count": 2, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "v3A6MpyQ2GGU", "outputId": "9179ab55-7a6f-4d65-80dc-6562e7f4048a" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: jax in /usr/local/lib/python3.10/dist-packages (0.4.26)\n", "Requirement already satisfied: ml-dtypes>=0.2.0 in /usr/local/lib/python3.10/dist-packages (from jax) (0.2.0)\n", "Requirement already satisfied: numpy>=1.22 in /usr/local/lib/python3.10/dist-packages (from jax) (1.25.2)\n", "Requirement already satisfied: opt-einsum in /usr/local/lib/python3.10/dist-packages (from jax) (3.3.0)\n", "Requirement already satisfied: scipy>=1.9 in /usr/local/lib/python3.10/dist-packages (from jax) (1.13.1)\n" ] } ], "source": [ "pip install jax" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "crwOJFYLfy4G", "outputId": "99ebbad6-8895-4fcd-f5cd-2324e2e80078" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: jax in /usr/local/lib/python3.10/dist-packages (0.4.26)\n", "Collecting jax\n", " Downloading jax-0.4.30-py3-none-any.whl.metadata (22 kB)\n", "Collecting jaxlib<=0.4.30,>=0.4.27 (from jax)\n", " Downloading jaxlib-0.4.30-cp310-cp310-manylinux2014_x86_64.whl.metadata (1.0 kB)\n", "Requirement already satisfied: ml-dtypes>=0.2.0 in /usr/local/lib/python3.10/dist-packages (from jax) (0.2.0)\n", "Requirement already satisfied: numpy>=1.22 in /usr/local/lib/python3.10/dist-packages (from jax) (1.25.2)\n", "Requirement already satisfied: opt-einsum in /usr/local/lib/python3.10/dist-packages (from jax) (3.3.0)\n", "Requirement already satisfied: scipy>=1.9 in /usr/local/lib/python3.10/dist-packages (from jax) (1.13.1)\n", "Downloading jax-0.4.30-py3-none-any.whl (2.0 MB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.0/2.0 MB\u001b[0m \u001b[31m20.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hDownloading jaxlib-0.4.30-cp310-cp310-manylinux2014_x86_64.whl (79.6 MB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m79.6/79.6 MB\u001b[0m \u001b[31m7.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hInstalling collected packages: jaxlib, jax\n", " Attempting uninstall: jaxlib\n", " Found existing installation: jaxlib 0.4.26+cuda12.cudnn89\n", " Uninstalling jaxlib-0.4.26+cuda12.cudnn89:\n", " Successfully uninstalled jaxlib-0.4.26+cuda12.cudnn89\n", " Attempting uninstall: jax\n", " Found existing installation: jax 0.4.26\n", " Uninstalling jax-0.4.26:\n", " Successfully uninstalled jax-0.4.26\n", "Successfully installed jax-0.4.30 jaxlib-0.4.30\n" ] } ], "source": [ "pip install -U jax" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "AVPjrTfDHzBh", "outputId": "045dca43-49e3-431c-ec0a-c8ef5c074b24" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Collecting datasets\n", " Downloading datasets-2.20.0-py3-none-any.whl.metadata (19 kB)\n", "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from datasets) (3.15.4)\n", "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from datasets) (1.25.2)\n", "Collecting pyarrow>=15.0.0 (from datasets)\n", " Downloading pyarrow-17.0.0-cp310-cp310-manylinux_2_28_x86_64.whl.metadata (3.3 kB)\n", "Requirement already satisfied: pyarrow-hotfix in /usr/local/lib/python3.10/dist-packages (from datasets) (0.6)\n", "Collecting dill<0.3.9,>=0.3.0 (from datasets)\n", " Downloading dill-0.3.8-py3-none-any.whl.metadata (10 kB)\n", "Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from datasets) (2.0.3)\n", "Collecting requests>=2.32.2 (from datasets)\n", " Downloading requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)\n", "Requirement already satisfied: tqdm>=4.66.3 in /usr/local/lib/python3.10/dist-packages (from datasets) (4.66.4)\n", "Collecting xxhash (from datasets)\n", " Downloading xxhash-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)\n", "Collecting multiprocess (from datasets)\n", " Downloading multiprocess-0.70.16-py310-none-any.whl.metadata (7.2 kB)\n", "Collecting fsspec<=2024.5.0,>=2023.1.0 (from fsspec[http]<=2024.5.0,>=2023.1.0->datasets)\n", " Downloading fsspec-2024.5.0-py3-none-any.whl.metadata (11 kB)\n", "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets) (3.9.5)\n", "Requirement already satisfied: huggingface-hub>=0.21.2 in /usr/local/lib/python3.10/dist-packages (from datasets) (0.23.5)\n", "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from datasets) (24.1)\n", "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (6.0.1)\n", "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.3.1)\n", "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (23.2.0)\n", "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.4.1)\n", "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (6.0.5)\n", "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.9.4)\n", "Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (4.0.3)\n", "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.21.2->datasets) (4.12.2)\n", "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (3.3.2)\n", "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (3.7)\n", "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (2.0.7)\n", "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (2024.7.4)\n", "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2.8.2)\n", "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2024.1)\n", "Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2024.1)\n", "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.2->pandas->datasets) (1.16.0)\n", "Downloading datasets-2.20.0-py3-none-any.whl (547 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m547.8/547.8 kB\u001b[0m \u001b[31m17.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hDownloading dill-0.3.8-py3-none-any.whl (116 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m116.3/116.3 kB\u001b[0m \u001b[31m10.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hDownloading fsspec-2024.5.0-py3-none-any.whl (316 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m316.1/316.1 kB\u001b[0m \u001b[31m30.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hDownloading pyarrow-17.0.0-cp310-cp310-manylinux_2_28_x86_64.whl (39.9 MB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m39.9/39.9 MB\u001b[0m \u001b[31m14.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hDownloading requests-2.32.3-py3-none-any.whl (64 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m64.9/64.9 kB\u001b[0m \u001b[31m5.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hDownloading multiprocess-0.70.16-py310-none-any.whl (134 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m11.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hDownloading xxhash-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (194 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m194.1/194.1 kB\u001b[0m \u001b[31m14.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25hInstalling collected packages: xxhash, requests, pyarrow, fsspec, dill, multiprocess, datasets\n", " Attempting uninstall: requests\n", " Found existing installation: requests 2.31.0\n", " Uninstalling requests-2.31.0:\n", " Successfully uninstalled requests-2.31.0\n", " Attempting uninstall: pyarrow\n", " Found existing installation: pyarrow 14.0.2\n", " Uninstalling pyarrow-14.0.2:\n", " Successfully uninstalled pyarrow-14.0.2\n", " Attempting uninstall: fsspec\n", " Found existing installation: fsspec 2024.6.1\n", " Uninstalling fsspec-2024.6.1:\n", " Successfully uninstalled fsspec-2024.6.1\n", "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", "torch 2.3.1+cu121 requires nvidia-cublas-cu12==12.1.3.1; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", "torch 2.3.1+cu121 requires nvidia-cuda-cupti-cu12==12.1.105; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", "torch 2.3.1+cu121 requires nvidia-cuda-nvrtc-cu12==12.1.105; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", "torch 2.3.1+cu121 requires nvidia-cuda-runtime-cu12==12.1.105; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", "torch 2.3.1+cu121 requires nvidia-cudnn-cu12==8.9.2.26; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", "torch 2.3.1+cu121 requires nvidia-cufft-cu12==11.0.2.54; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", "torch 2.3.1+cu121 requires nvidia-curand-cu12==10.3.2.106; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", "torch 2.3.1+cu121 requires nvidia-cusolver-cu12==11.4.5.107; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", "torch 2.3.1+cu121 requires nvidia-cusparse-cu12==12.1.0.106; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", "torch 2.3.1+cu121 requires nvidia-nccl-cu12==2.20.5; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", "torch 2.3.1+cu121 requires nvidia-nvtx-cu12==12.1.105; platform_system == \"Linux\" and platform_machine == \"x86_64\", which is not installed.\n", "cudf-cu12 24.4.1 requires pyarrow<15.0.0a0,>=14.0.1, but you have pyarrow 17.0.0 which is incompatible.\n", "gcsfs 2024.6.1 requires fsspec==2024.6.1, but you have fsspec 2024.5.0 which is incompatible.\n", "google-colab 1.0.0 requires requests==2.31.0, but you have requests 2.32.3 which is incompatible.\n", "ibis-framework 8.0.0 requires pyarrow<16,>=2, but you have pyarrow 17.0.0 which is incompatible.\u001b[0m\u001b[31m\n", "\u001b[0mSuccessfully installed datasets-2.20.0 dill-0.3.8 fsspec-2024.5.0 multiprocess-0.70.16 pyarrow-17.0.0 requests-2.32.3 xxhash-3.4.1\n" ] } ], "source": [ "!pip3 install datasets" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 469, "referenced_widgets": [ "b73ba84c160b487a88642e37d40b12d3", "84f7bb881e6140b0b24b5713d1e1d480", "4f2269b3b1354d8584fe656f98d609fc", "2e468483a4a84c279b169ea2e47a95f1", "d37f5831e7d34e818b55bc77535b1864", "f84dde5581ba47f2858fb3df098d7e63", "e84cbdf874d8422990dc8b9da2762bd7", "3ca73ffe77e2429bb8e4f82d49cfc39d", "b5e75af11483420a97cb7358e10e0a8a", "82d7036129a149f2aa3fb083012ffd28", "2c05bacfd939427aa6ffc475b000ec3c", "f7ebf09d9d134fe98b5b6cc72f3c4383", "fcd10f203f7b4444a542f4bc46819bb0", "fdee9c4abbb44f8eb6bd2c086cdc35f0", "4537e006398a40bba662bd107738260b", "687f71247fe547f58c15e88dfc877539", "7301f73ac17d48cd89ad34b73a90f8a5", "4f6c2315a70b4233904da1e298d1afc0", "0314d66ef91b4444bb6f6c88518a25c5", "b2971fda27d042d9aa724d6525bf4c9b", "68da8c3879a847b09b0e651884b5c1a0", "da9637b20f514e169df8a0f1f36ddff2", "703cce4bdd344a648b464a46628c6d4c", "f2a510c32bc74b33b198afb768c007aa", "c49769104e7540b0bddc4e032acf5bff", "bcee0902bd1344058c3ef2c084193e93", "913511092fbb4b77af8b62a8a8842286", "f854664e703d4ffcb8e727fe3303a6a5", "9a86368c7193427593523d6eec2d39dd", "89502b3f46d244d6aef1ca88059d9749", "498bb9451fbb4e0999bce7bf46660c6b", "8db61fd6f451465893332522f90f993c", "c3d357db23e04bf6841850f86c869f32", "52706477c5d24007a70b13554485ce73", "c8b60addbf194beaa2baaa13ca55b53b", "a5b876316d954cec90de7d2db63e63ee", "1401ce1f323e4970883f465425537dde", "56adc36bfc2c45f39a4aefef41683fe0", "f584d1be92824cd887cdc792ae25c848", "8613bce8c0b54a24895c14cc3e129e08", "c146f2236cf843c0b6500cdaf96fcc8f", "76a772e7c0ce4618b09249b1a14d7f46", "4f52a9acae7149c3ae34b6c79ba25d1d", "6af6a25f5b7b4cb5be9c57a528161786", "7635754453f2469ea30b70434a05ef0b", "6738fd4585df48858e4a0873107264ad", "1235dd6e99a14b368ce56c0cde2f7d3d", "b82681e38e06438491f97464eb1b8201", "d0a7f1707bbf488c85c164606fe708c4", "8269aa9b06454c0a8687fd484b20da6c", "4d7531b07bf24ac2b526088d1ff690c9", "c31c403605644fb0ba09038f02409f3a", "9e7c6f31148d41cf922b9f791ec43501", "106bf8a7a1164d048413e2eb7308e734", "1c1231954fbb49028fe866f4f2b97367", "4ab946402d904653a3d5813a3b17bd9c", "a14cd233548746239a752addba8b1741", "5934c90c17f4467ebac636d47a1fe7fc", "c3a1eeab7db4445581f9c4f3bb3c5419", "82047addfdba4d38a530cc81e96bfe75", "93106cbd133e4e4687bee2253e6fe442", "8fc84be040d04ce497cad6d2e3737dcf", "be76c1a8c9ba446d81c71e853fa191ea", "0391adf58391424499d97d42c766a413", "5e217155ba8a4146ab19072b92ee2228", "6228a5337eee4bbe9a7cbccf7d1fb74e", "3f311ef8babc47deb2153fd38c17f5f0", "9253936450d743479dcc97a50656c4f2", "1bfb04415c7b459c988c6d2325c0db8d", "b5b12d9f26624254a502e1e22ea147f6", "f94cb648fbc543f6b1ee413ed8abe450", "47104cb129e14d97830e66d319a8660f", "960ba49bf0d54a908132b9864f1ebdb2", "0cdbeaf1a131424687ff578b92d42ee4", "88c1f3616e304a5f9aa58e935973974f", "bf863cdb2ae74f62b277760a03bbf10d", "9cdc4c76755043c18f8854e7907b99b0" ] }, "id": "3sCOD-9sWjZ_", "outputId": "c7da3805-a7d4-4d88-8c3a-5bcea781a2e8" }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_token.py:89: UserWarning: \n", "The secret `HF_TOKEN` does not exist in your Colab secrets.\n", "To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n", "You will be able to reuse this secret in all of your notebooks.\n", "Please note that authentication is recommended but still optional to access public models or datasets.\n", " warnings.warn(\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "b73ba84c160b487a88642e37d40b12d3", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Downloading readme: 0%| | 0.00/7.81k [00:00, ?B/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "f7ebf09d9d134fe98b5b6cc72f3c4383", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Downloading data: 0%| | 0.00/21.0M [00:00, ?B/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "703cce4bdd344a648b464a46628c6d4c", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Downloading data: 0%| | 0.00/20.5M [00:00, ?B/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "52706477c5d24007a70b13554485ce73", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Downloading data: 0%| | 0.00/42.0M [00:00, ?B/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "7635754453f2469ea30b70434a05ef0b", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Generating train split: 0%| | 0/25000 [00:00, ? examples/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "4ab946402d904653a3d5813a3b17bd9c", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Generating test split: 0%| | 0/25000 [00:00, ? examples/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "3f311ef8babc47deb2153fd38c17f5f0", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Generating unsupervised split: 0%| | 0/50000 [00:00, ? examples/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ " sentence label\n", "0 I rented I AM CURIOUS-YELLOW from my video sto... 0\n", "1 \"I Am Curious: Yellow\" is a risible and preten... 0\n", "2 If only to avoid making this type of film in t... 0\n", "3 This film was probably inspired by Godard's Ma... 0\n", "4 Oh, brother...after hearing about this ridicul... 0\n" ] } ], "source": [ "from datasets import load_dataset\n", "import pandas as pd\n", "\n", "# Load the IMDb Reviews dataset\n", "imdb_dataset = load_dataset('imdb', split='train[:20000]')\n", "\n", "# Convert to pandas DataFrame\n", "df = pd.DataFrame(imdb_dataset)\n", "\n", "# Select only the 'text' and 'label' columns and rename them\n", "df_selected = df[['text', 'label']].rename(columns={'text': 'sentence', 'label': 'label'})\n", "\n", "# Display the first few rows of the resulting DataFrame\n", "print(df_selected.head())\n" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "eDge4LbvuMgx", "outputId": "659ba376-ab87-4882-8aad-f4185f2b6e2d" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Mounted at /content/drive/\n" ] } ], "source": [ "import zipfile\n", "from google.colab import drive\n", "\n", "drive.mount('/content/drive/')" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "RCWJzgTA3uy9", "outputId": "445b866d-3781-4e3c-a58f-536c357651e5", "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Archive: /content/drive/My Drive/text.zip\n", " creating: text/negative/\n", " inflating: text/negative/A Single Misheard Word The Shiloh Baptist Church Disaster A Short Documentary Fascinating Horror.txt \n", " inflating: text/negative/Accident Case Study Faulty Assumptions.txt \n", " inflating: text/negative/Accident report sheds light on Orlando theme park tragedy.txt \n", " inflating: text/negative/Accident reports.txt \n", " inflating: text/negative/Air Disasters Death and Denial Full Episode.txt \n", " inflating: text/negative/Bangladesh Quota Protests At Least 5 Killed & 400 Injured Vantage with Palki Sharma.txt \n", " inflating: text/negative/Britains Unsolved Crimewave Dispatches Channel 4 Documentaries.txt \n", " inflating: text/negative/Cases With The Most INSANE Twists Youve Ever Heard.txt \n", " inflating: text/negative/Catching a Serial Killer Inside the Investigation Real Stories True Crime Documentary.txt \n", " inflating: text/negative/Conflict Zone Is Libya a failed state DW English.txt \n", " inflating: text/negative/Devastating News - Farmhouse Planning Permission Denied By Burnley Council! UK Restoration Services.txt \n", " inflating: text/negative/Devastating News Divorce Court - William vs Ashley.txt \n", " inflating: text/negative/Disaster Or Best Show Ever Ozark Music Festival Jolted Missouri 50 Years Ago.txt \n", " inflating: text/negative/Disaster prevention and disaster control measures in natural disasters during COVID-19 pandemic.txt \n", " inflating: text/negative/English Vocabulary Crime & Criminals.txt \n", " inflating: text/negative/Exposing Iman Gadzhi and His Alleged Scam.txt \n", " inflating: text/negative/Forensic accountant explains why fraud thrives on Wall Street.txt \n", " inflating: text/negative/Groomed and then Murdered by a Millionaire Nadine Aburas Click For Murder.txt \n", " inflating: text/negative/How This 31 Year Old Woman Scammed JP Morgan.txt \n", " inflating: text/negative/How To Report Accidents & Incidents at Work How To Report Accidents at Work HSE STUDY GUIDE.txt \n", " inflating: text/negative/Inside Japans Nuclear Meltdown (full documentary) FRONTLINE.txt \n", " inflating: text/negative/Lemony Snickets A Series of Unfortunate Events (2004) Trailer 1 Movieclips Classic Trailers.txt \n", " inflating: text/negative/Lesson 46 Types of Crime Vocabulary Kidnapping Arson Human trafficking Hijacking learnenglish.txt \n", " inflating: text/negative/Mafia Boss & London Gangster Reveal Their Most Violent Crimes Crime Stories.txt \n", " inflating: text/negative/NATURAL DISASTERS THE EARTHQUAKE Stories For Kids In English TIA & TOFU Lessons For Kids.txt \n", " inflating: text/negative/Natural disasters.txt \n", " inflating: text/negative/Natural Hazards Crash Course Geography 27.txt \n", " inflating: text/negative/Pakistans Endless Economic Crisis.txt \n", " inflating: text/negative/Real life tornado hunter reviews accuracy of Twisters movie.txt \n", " inflating: text/negative/Restoring power after a natural disaster could look different in a COVID-19 world.txt \n", " inflating: text/negative/Sun Tzu - The Art of War Documentary.txt \n", " inflating: text/negative/The Big Lottery Scam Scammed Real Crime.txt \n", " inflating: text/negative/The Chilling Case of Kira Steger True Crime Documentary.txt \n", " inflating: text/negative/The COVID-19 crisis is like a natural disaster.txt \n", " inflating: text/negative/The Disturbing Case of Vanessa Marcotte True Crime Documentary.txt \n", " inflating: text/negative/The Exploding Town Disaster.txt \n", " inflating: text/negative/The Glass Tower Disaster A Short Documentary Fascinating Horror.txt \n", " inflating: text/negative/The Heartbreaking Case of Ekaterina Baumann True Crime Documentary.txt \n", " inflating: text/negative/The Indo-Pakistani War 1965 Animated History.txt \n", " inflating: text/negative/The Man Behind the Worlds Biggest Financial Fraud Investigators.txt \n", " inflating: text/negative/The Most TWISTED Case Youve Ever Heard Documentary.txt \n", " inflating: text/negative/The secret relationship that ended in a Christmas murder - Murder Documentary UK.txt \n", " inflating: text/negative/The Tay Bridge Disaster A Short Documentary Fascinating Horror.txt \n", " inflating: text/negative/The Tragic Life of Ranvir Shorey Big Boss Reality.txt \n", " inflating: text/negative/The True Crime Story Behind When a Stranger Calls Crimetober.txt \n", " inflating: text/negative/The Uber Story Fraud Betrayal Death & Cars.txt \n", " inflating: text/negative/The Willow Island Disaster A Short Documentary Fascinating Horror.txt \n", " inflating: text/negative/The Worlds Most Complex Catfishing Scam Investigators.txt \n", " creating: text/positive/\n", " inflating: text/positive/10 lines on Helping others l Essay on helping others l.txt \n", " inflating: text/positive/10 Minutes for the next 10 Years - Matthew McConaughey Motivational Speech.txt \n", " inflating: text/positive/10 Minutes to Start Your Day Right! - Motivational Speech By Oprah Winfrey [YOU NEED TO WATCH THIS].txt \n", " inflating: text/positive/13 DEEDS ALLAH ABSOLUTELY LOVES.txt \n", " inflating: text/positive/3 Stories That WILL MAKE YOU FEEL GOOD!.txt \n", " inflating: text/positive/4 Minutes To Start Your Day Right! MORNING MOTIVATION and Positivity!.txt \n", " inflating: text/positive/5 Minutes for the Next 50 Years - Mathhew McConaughey Motivational Speech.txt \n", " inflating: text/positive/Admiral McRaven Leaves the Audience SPEECHLESS One of the Best Motivational Speeches.txt \n", " inflating: text/positive/Barack Obamas Inspirational Speech with Subtitles One of the best English speeches ever 2023.txt \n", " inflating: text/positive/Dont Avoid Obstacles Overcome Them Jessie Adams TEDxDavenport.txt \n", " inflating: text/positive/Dont blindly rush into good deeds Acharya Prashant (2019).txt \n", " inflating: text/positive/DONT COMPLAIN JUST ENJOY YOUR PAINREBUILD YOURSELF - Best Motivational Speeches.txt \n", " inflating: text/positive/Failing at Normal An ADHD Success Story Jessica McCabe TEDxBratislava.txt \n", " inflating: text/positive/FOCUS ON YOURSELF NOT OTHERS (motivational video).txt \n", " inflating: text/positive/Friends - A Selfless Good Deed.txt \n", " inflating: text/positive/GODS PLAN FOR YOU! Best Motivational Speech inspired by Denzel Washington Inspirational Video.txt \n", " extracting: text/positive/Happy Moments in Life.txt \n", " inflating: text/positive/HAPPY MOMENTS QUOTES That Will Inspire You Cherish your Happy Moments.txt \n", " inflating: text/positive/Happy Moments Video Compilation 2016.txt \n", " inflating: text/positive/He Failed 1000 Times (Real Life Story).txt \n", " inflating: text/positive/Help Yourself by Helping Others One of The Most Inspirational Speech Ever (Simon Sinek Motivation).txt \n", " inflating: text/positive/Helping Others Angus Hall TEDxYouth@TCS.txt \n", " inflating: text/positive/Helping others makes us happier -- but it matters how we do it Elizabeth Dunn.txt \n", " inflating: text/positive/How Starbucks Became a 100B Success Story Howard Schultz From Poor Boy To Billionaire.txt \n", " inflating: text/positive/How To Be Happy Buddhism In English.txt \n", " inflating: text/positive/How to Be Happy Every Day It Will Change the World Jacqueline Way TEDxStanleyPark.txt \n", " inflating: text/positive/How To Overcome Adversity.txt \n", " inflating: text/positive/ITS SUPPOSED TO BE HARD - Powerful Motivational Speech.txt \n", " inflating: text/positive/MOVE IN SILENCE SHOCK THEM WITH YOUR SUCCESS - Motivational Speech (Marcus Elevation Taylor).txt \n", " inflating: text/positive/One of the Greatest Speeches Ever Steve Jobs.txt \n", " inflating: text/positive/Overcoming obstacles - Steven Claunch.txt \n", " inflating: text/positive/Overcoming Obstacles and Reaching Self-Fulfillment Bryan Humphrey TEDxSouthwesternAU.txt \n", " inflating: text/positive/PROBLEMS IN LIFE A Life Lesson Story On Growth And Success .txt \n", " inflating: text/positive/Ripple (Award Winning)- Kindness and good deeds will come back to you.txt \n", " inflating: text/positive/The Motivational Success Story Of JK Rowling - From Deep Depression To Worlds RICHEST AUTHOR.txt \n", " inflating: text/positive/THE POWER OF POSITIVITY - Best Motivational Video For Positive Thinking.txt \n", " inflating: text/positive/The Speech That Brought This Entire School To Tears (The Most Inspiring Motivational Video of 2017).txt \n", " inflating: text/positive/Three Laughing Monks Story - zen motivation.txt \n", " inflating: text/positive/Time StoryA Motivational Story.txt \n", " inflating: text/positive/To overcome challenges stop comparing yourself to others Dean Furness.txt \n", " inflating: text/positive/Transcribe Video to Text with Python and Watson in 15 Minutes.txt \n", " inflating: text/positive/WATCH THIS EVERYDAY AND CHANGE YOUR LIFE - Denzel Washington Motivational Speech 2023.txt \n", " inflating: text/positive/What really matters at the end of life BJ Miller TED.txt \n" ] } ], "source": [ "!unzip \"/content/drive/My Drive/text.zip\"" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "zqNxp9-G4xoF", "outputId": "8cb47945-c996-496c-82fd-146f3fb41602" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Contents of text directory: ['positive', 'negative']\n" ] } ], "source": [ "import os\n", "dir = \"text/\"\n", "text_dir_contents = os.listdir(dir)\n", "print(\"Contents of text directory:\", text_dir_contents)\n", "\n", "negative_dir = os.path.join(\"text/\", \"negative\")\n", "positive_dir = os.path.join(\"text/\", \"positive\")\n" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "tfco51dY5yGY", "outputId": "c8da7683-7230-45ac-a58e-4ef34613eaac" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " text label\n", "0 I would rather tell the world what I've done t... 1\n", "1 Today I need you to embrace what comes hard. T... 1\n", "2 Once upon a time in a small village there live... 1\n", "3 چھانک سے Big Boss میں جانے کا Дysition کیسے لی... 0\n", "4 As you can see, I was born without fingers on ... 1\n" ] } ], "source": [ "import pandas as pd\n", "def load_data_from_folder(folder_path, label):\n", " texts = []\n", " for filename in os.listdir(folder_path):\n", " file_path = os.path.join(folder_path, filename)\n", " if os.path.isfile(file_path):\n", " with open(file_path, 'r', encoding='utf-8') as file:\n", " text = file.read().strip()\n", " texts.append((text, label))\n", " return texts\n", "\n", "negative_samples = load_data_from_folder(negative_dir, 0)\n", "positive_samples = load_data_from_folder(positive_dir, 1)\n", "\n", "all_samples = negative_samples + positive_samples\n", "df = pd.DataFrame(all_samples, columns=[\"text\", \"label\"])\n", "df = df.sample(frac=1).reset_index(drop=True)\n", "print(df.head())" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "S-Q_P3s16j7U", "outputId": "ab0e0b92-bc91-4c14-fc03-0794b9edda7a" }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[nltk_data] Downloading package punkt to /root/nltk_data...\n", "[nltk_data] Unzipping tokenizers/punkt.zip.\n" ] }, { "data": { "text/plain": [ "True" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import nltk\n", "import pandas as pd\n", "from nltk.tokenize import sent_tokenize\n", "\n", "# Download required resources for sentence tokenization\n", "nltk.download('punkt')\n" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "ukiRauFD6lQh", "outputId": "d690f837-f0e9-4091-f9f9-fd9868fd5233" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " sentence label\n", "0 I would rather tell the world what I've done t... 1\n", "1 There's enough people talking. 1\n", "2 Just make the move and don't talk until it's t... 1\n", "3 Move in silence. 1\n", "4 One of the most underrated superpowers on eart... 1\n" ] } ], "source": [ "\n", "# Function to split text into sentences and label them\n", "def split_into_sentences(text, label):\n", " sentences = sent_tokenize(text)\n", " return [(sentence, label) for sentence in sentences]\n", "\n", "# Create a new list to hold sentence-level data\n", "sentence_data = []\n", "\n", "# Iterate over the dataframe and split texts into sentences\n", "for index, row in df.iterrows():\n", " text = row['text']\n", " label = row['label']\n", " sentences = split_into_sentences(text, label)\n", " sentence_data.extend(sentences)\n", "\n", "# Create a new DataFrame for sentence-level data\n", "sentence_df = pd.DataFrame(sentence_data, columns=[\"sentence\", \"label\"])\n", "\n", "# Display the first few rows of the new DataFrame\n", "print(sentence_df.head())\n" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "pauHO5ry7J3V", "outputId": "54a35fa1-37ed-4fed-cfd6-7be13088e023" }, "outputs": [ { "data": { "text/plain": [ "(13328, 2)" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sentence_df.shape" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "twtK1DrE6nZk", "outputId": "1cce6139-994c-460d-adf5-2c5cc8755c0b" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "sentence No Can I ask you a question?\n", "label 0\n", "Name: 276, dtype: object\n" ] } ], "source": [ "# Display the first few sentences with label 0\n", "print(sentence_df[sentence_df['label'] == 0].iloc[1])" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "tEPgnXc93xSE", "outputId": "728c932e-5dc9-48a1-860b-2e2a5f1951ad" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " sentence label\n", "0 I was true to my regard for Mr. Glover and Ms.... 0\n", "1 What surprised me most about this film was the... 1\n", "2 I saw this film in its premier week in 1975. I... 0\n", "3 It was obvious that the Lakers would have to f... 1\n", "4 A very strong movie. Bruce is good and Brad al... 1\n" ] } ], "source": [ "combined_df = pd.concat([sentence_df, df_selected], ignore_index=True)\n", "combined_df = combined_df.sample(frac=1).reset_index(drop=True)\n", "\n", "print(combined_df.head())" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "ngGjmA7ckWUC", "outputId": "025ab0d8-7f3c-4253-f572-eb97ee23fa71" }, "outputs": [ { "data": { "text/plain": [ "(13328, 2)" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sentence_df.shape" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "id": "XGg5EepsJiVo" }, "outputs": [], "source": [ "from datasets import Dataset\n", "dataset = Dataset.from_pandas(combined_df)" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 177, "referenced_widgets": [ "9bc61cfa2f41410c8ed68f6f1de45566", "e3f58d7001e244c28da6174ba31fb8d2", "80fb74a9969646029b183cfa215c69c7", "bdd570a6bd5d4c32b9335cfab99af9c2", "27d98fc5fbd94aae9efd5e181c515b77", "92d96ba5589f4a3d8f8493399962eeb0", "5da9b9d33ce7450c8e3b90429f123d54", "77c4d09c762240ef9a2f85b977f2b7bb", "d44cdd7433b7469d88f1bb9ce298e873", "0fb9ee6546b74674a1bff1702bc81cac", "6491bc68c3cf41e789dc1704ab317632", "75f92a4126fb43aeaee764153000e629", "d60462c107734e37a28299beb973bd75", "03d2d7bcfba642368abc435647a6aa35", "a74a2282fd1041dab9aeb918bd1e2121", "dd44343698534ef58c33310f741d1832", "fec2ce5ad79142439b2ee01bf3a48c73", "0cdb0943cc224f8eac2bf63fd62afc53", "90a1cf6e2c8d466a8429222c30a68c50", "0dc328fb2d054af1ad95ef44203cd286", "da4e92929d6340d4b0493648d8796716", "a1ed06ad743e4690a9b925dabf150d5e", "d08212952a2b4e29aba366aa56886f9e", "ba512d59fa6b4c0ba29d9fbf4df5319c", "78c66b4ed60f457992b8c7264652297f", "c18ec58e558a4270960e1a63ffdebaee", "a84caeaa29bb40c49c1b5d3d75142cb4", "3a8162b0138844d38071bef3c1ea0064", "2db109b114ab4bc6815092fda5f53b09", "58f40bd07a1046b9b289bb6655fa3f6c", "59b387f8fdc04b9ca51b67e0b34d5a28", "6cdee2c9037e435b82b0e79dfbbc24d9", "a95fa4deb9a444609609baafa397dbe2", "3e585fdc1dd8403fba882f1cefa1f227", "c8064a9748974e6fbfdb01907cc74e07", "f0bd7c21c37d41219be2eaa87bc019f1", "c8e9e1b05dcc416b9ce225d2a87473a1", "ae6de8b996e143019eb690f2b904763d", "e7ea8be7f7a84018a71ec2415e134d75", "5e9ca9f93cc34dad925e4ff58965696a", "d633639dcf694766be8295026c002b1e", "11b0ad38f37141a3b0227364e0ba6898", "7ae69b575106497981aa924404724e6e", "f0937472e967473da516373b44a90272", "ddca42e26ab340b1b335862d15bf99cd", "115d5532596b4ddfb3d1540999f03ca6", "471c6181e0964dd396297bb3bfeac134", "4ef5e06667c44f1eb08c382764ad55c9", "ec871dc1ec5c4542beab55af55126afc", "67225d4ea9754367a1c36bbe40faa0eb", "cb0667e00bba436392aafd5480671e42", "c6412dba98df4977aa421e6d081917ce", "7f2a61d806ce4f63b48e8f498d0fb90b", "f56aadbbd4a148ff9fb03b88a6a624c3", "2f77da1159074286b962f36f3a24c84f" ] }, "id": "_JflpmpHHuAN", "outputId": "6218e297-6300-42c6-ecaf-143d5f85e863" }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "9bc61cfa2f41410c8ed68f6f1de45566", "version_major": 2, "version_minor": 0 }, "text/plain": [ "tokenizer_config.json: 0%| | 0.00/48.0 [00:00, ?B/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "75f92a4126fb43aeaee764153000e629", "version_major": 2, "version_minor": 0 }, "text/plain": [ "vocab.txt: 0%| | 0.00/232k [00:00, ?B/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "d08212952a2b4e29aba366aa56886f9e", "version_major": 2, "version_minor": 0 }, "text/plain": [ "tokenizer.json: 0%| | 0.00/466k [00:00, ?B/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "3e585fdc1dd8403fba882f1cefa1f227", "version_major": 2, "version_minor": 0 }, "text/plain": [ "config.json: 0%| | 0.00/570 [00:00, ?B/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "ddca42e26ab340b1b335862d15bf99cd", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Map: 0%| | 0/33328 [00:00, ? examples/s]" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from transformers import BertTokenizer\n", "\n", "tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')\n", "\n", "def tokenize_function(examples):\n", " return tokenizer(examples['sentence'], padding='max_length', truncation=True)\n", "\n", "# Convert DataFrame to Dataset\n", "from datasets import Dataset\n", "\n", "combined_dataset = Dataset.from_pandas(combined_df)\n", "\n", "# Tokenize the dataset\n", "tokenized_combined_dataset = combined_dataset.map(tokenize_function, batched=True)" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "id": "PcIu8ZElH2Ua" }, "outputs": [], "source": [ "train_test_split = tokenized_combined_dataset.train_test_split(test_size=0.2)\n", "train_dataset = train_test_split['train']\n", "eval_dataset = train_test_split['test']\n", "\n", "train_dataset.set_format('torch', columns=['input_ids', 'attention_mask', 'label'])\n", "eval_dataset.set_format('torch', columns=['input_ids', 'attention_mask', 'label'])" ] }, { "cell_type": "code", "execution_count": 21, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 343, "referenced_widgets": [ "af4cd15088424ce38ef17656d1560f27", "44ced7eeb2204d0d868c189f82f7be61", "424fc525d668431a8538a0255b5147fb", "a5da3f56d45f4ab6bd1a1e9017cec1d4", "d08c429eaf4c464a8a04d6c83b1b114b", "a8cd4494d8124d298e6d163785fee3b5", "85bd200576564a2895963bcf19281235", "5815c1c558854b6b9ed90468ed168081", "a43d5750f50045a0b25ed682c7414af5", "7ea79e98260744128c8bd662cf93241c", "c0da4593d6ea492a94603828dd665d5d" ] }, "id": "chfZeVVu5Yab", "outputId": "9cbceeac-fdc9-4fd5-b3b8-98615e499b53" }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "af4cd15088424ce38ef17656d1560f27", "version_major": 2, "version_minor": 0 }, "text/plain": [ "model.safetensors: 0%| | 0.00/440M [00:00, ?B/s]" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stderr", "output_type": "stream", "text": [ "Some weights of BertForSequenceClassification were not initialized from the model checkpoint at bert-base-uncased and are newly initialized: ['classifier.bias', 'classifier.weight']\n", "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n", "/usr/local/lib/python3.10/dist-packages/transformers/training_args.py:1494: FutureWarning: `evaluation_strategy` is deprecated and will be removed in version 4.46 of 🤗 Transformers. Use `eval_strategy` instead\n", " warnings.warn(\n" ] }, { "data": { "text/html": [ "\n", "
Epoch | \n", "Training Loss | \n", "Validation Loss | \n", "
---|---|---|
1 | \n", "0.280400 | \n", "0.235824 | \n", "
2 | \n", "0.161900 | \n", "0.239435 | \n", "
3 | \n", "0.039600 | \n", "0.303847 | \n", "
"
],
"text/plain": [
"