diff --git "a/distortion-classification-deeplearning.ipynb" "b/distortion-classification-deeplearning.ipynb"
new file mode 100644--- /dev/null
+++ "b/distortion-classification-deeplearning.ipynb"
@@ -0,0 +1,4283 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "id": "dc83b044",
+ "metadata": {
+ "_cell_guid": "b1076dfc-b9ad-4769-8c92-a6c4dae69d19",
+ "_uuid": "8f2839f25d086af736a60e9eeb907d3b93b6e0e5",
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:30:53.259401Z",
+ "iopub.status.busy": "2025-07-31T07:30:53.259098Z",
+ "iopub.status.idle": "2025-07-31T07:30:56.207017Z",
+ "shell.execute_reply": "2025-07-31T07:30:56.206404Z"
+ },
+ "papermill": {
+ "duration": 2.954748,
+ "end_time": "2025-07-31T07:30:56.208452",
+ "exception": false,
+ "start_time": "2025-07-31T07:30:53.253704",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "import matplotlib.pyplot as plt\n",
+ "import seaborn as sns\n",
+ "import os, re, warnings\n",
+ "\n",
+ "warnings.filterwarnings('ignore')"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "id": "3fef7e91",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:30:56.217100Z",
+ "iopub.status.busy": "2025-07-31T07:30:56.216792Z",
+ "iopub.status.idle": "2025-07-31T07:30:56.326729Z",
+ "shell.execute_reply": "2025-07-31T07:30:56.325825Z"
+ },
+ "papermill": {
+ "duration": 0.115872,
+ "end_time": "2025-07-31T07:30:56.328285",
+ "exception": false,
+ "start_time": "2025-07-31T07:30:56.212413",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Id_Number | \n",
+ " Patient Question | \n",
+ " Distorted part | \n",
+ " Dominant Distortion | \n",
+ " Secondary Distortion (Optional) | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 0 | \n",
+ " 4500 | \n",
+ " Hello, I have a beautiful,smart,outgoing and a... | \n",
+ " The voice are always fimilar (someone she know... | \n",
+ " Personalization | \n",
+ " NaN | \n",
+ "
\n",
+ " \n",
+ " | 1 | \n",
+ " 4501 | \n",
+ " Since I was about 16 years old I’ve had these ... | \n",
+ " I feel trapped inside my disgusting self and l... | \n",
+ " Labeling | \n",
+ " Emotional Reasoning | \n",
+ "
\n",
+ " \n",
+ " | 2 | \n",
+ " 4502 | \n",
+ " So I’ve been dating on and off this guy for a... | \n",
+ " NaN | \n",
+ " No Distortion | \n",
+ " NaN | \n",
+ "
\n",
+ " \n",
+ " | 3 | \n",
+ " 4503 | \n",
+ " My parents got divorced in 2004. My mother has... | \n",
+ " NaN | \n",
+ " No Distortion | \n",
+ " NaN | \n",
+ "
\n",
+ " \n",
+ " | 4 | \n",
+ " 4504 | \n",
+ " I don’t really know how to explain the situati... | \n",
+ " I refused to go because I didn’t know if it wa... | \n",
+ " Fortune-telling | \n",
+ " Emotional Reasoning | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Id_Number Patient Question \\\n",
+ "0 4500 Hello, I have a beautiful,smart,outgoing and a... \n",
+ "1 4501 Since I was about 16 years old I’ve had these ... \n",
+ "2 4502 So I’ve been dating on and off this guy for a... \n",
+ "3 4503 My parents got divorced in 2004. My mother has... \n",
+ "4 4504 I don’t really know how to explain the situati... \n",
+ "\n",
+ " Distorted part Dominant Distortion \\\n",
+ "0 The voice are always fimilar (someone she know... Personalization \n",
+ "1 I feel trapped inside my disgusting self and l... Labeling \n",
+ "2 NaN No Distortion \n",
+ "3 NaN No Distortion \n",
+ "4 I refused to go because I didn’t know if it wa... Fortune-telling \n",
+ "\n",
+ " Secondary Distortion (Optional) \n",
+ "0 NaN \n",
+ "1 Emotional Reasoning \n",
+ "2 NaN \n",
+ "3 NaN \n",
+ "4 Emotional Reasoning "
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "df = pd.read_csv('/kaggle/input/dis-full-speech/distortion.csv')\n",
+ "df.head()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "id": "feae1753",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:30:56.338782Z",
+ "iopub.status.busy": "2025-07-31T07:30:56.338552Z",
+ "iopub.status.idle": "2025-07-31T07:30:56.353997Z",
+ "shell.execute_reply": "2025-07-31T07:30:56.353278Z"
+ },
+ "papermill": {
+ "duration": 0.02184,
+ "end_time": "2025-07-31T07:30:56.355138",
+ "exception": false,
+ "start_time": "2025-07-31T07:30:56.333298",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Id_Number | \n",
+ " Patient Question | \n",
+ " Distorted part | \n",
+ " Dominant Distortion | \n",
+ " Secondary Distortion (Optional) | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 0 | \n",
+ " 4500 | \n",
+ " Hello, I have a beautiful,smart,outgoing and a... | \n",
+ " The voice are always fimilar (someone she know... | \n",
+ " Personalization | \n",
+ " NaN | \n",
+ "
\n",
+ " \n",
+ " | 1 | \n",
+ " 4501 | \n",
+ " Since I was about 16 years old I’ve had these ... | \n",
+ " I feel trapped inside my disgusting self and l... | \n",
+ " Labeling | \n",
+ " Emotional Reasoning | \n",
+ "
\n",
+ " \n",
+ " | 4 | \n",
+ " 4504 | \n",
+ " I don’t really know how to explain the situati... | \n",
+ " I refused to go because I didn’t know if it wa... | \n",
+ " Fortune-telling | \n",
+ " Emotional Reasoning | \n",
+ "
\n",
+ " \n",
+ " | 9 | \n",
+ " 4510 | \n",
+ " I have been with my fiancé for two years now.... | \n",
+ " I felt like the response was totally irrationa... | \n",
+ " Magnification | \n",
+ " NaN | \n",
+ "
\n",
+ " \n",
+ " | 10 | \n",
+ " 4511 | \n",
+ " My husband and I have been married for over a ... | \n",
+ " I thought that he displayed traits of honor, l... | \n",
+ " Labeling | \n",
+ " NaN | \n",
+ "
\n",
+ " \n",
+ " | ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ "
\n",
+ " \n",
+ " | 2519 | \n",
+ " 2553 | \n",
+ " I feel overprotective about my mother because ... | \n",
+ " Since then, whenever my mother is out alone, I... | \n",
+ " All-or-nothing thinking | \n",
+ " Overgeneralization | \n",
+ "
\n",
+ " \n",
+ " | 2522 | \n",
+ " 2557 | \n",
+ " From Lebanon: I am dealing with a big problem!... | \n",
+ " My family hate him but they didn’t met him at ... | \n",
+ " Magnification | \n",
+ " NaN | \n",
+ "
\n",
+ " \n",
+ " | 2523 | \n",
+ " 2559 | \n",
+ " From the U.S.: I am a junior in high school, a... | \n",
+ " However, I am not happy, at the least only hal... | \n",
+ " Labeling | \n",
+ " All-or-nothing thinking | \n",
+ "
\n",
+ " \n",
+ " | 2526 | \n",
+ " 2563 | \n",
+ " I am 21 female and have not had any friends fo... | \n",
+ " Now I am at university my peers around me all ... | \n",
+ " Overgeneralization | \n",
+ " NaN | \n",
+ "
\n",
+ " \n",
+ " | 2527 | \n",
+ " 2564 | \n",
+ " From the U.S.: My brother is 19 years old and ... | \n",
+ " He claims he’s severely depressed and has outb... | \n",
+ " Mental filter | \n",
+ " Mind Reading | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
1597 rows × 5 columns
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Id_Number Patient Question \\\n",
+ "0 4500 Hello, I have a beautiful,smart,outgoing and a... \n",
+ "1 4501 Since I was about 16 years old I’ve had these ... \n",
+ "4 4504 I don’t really know how to explain the situati... \n",
+ "9 4510 I have been with my fiancé for two years now.... \n",
+ "10 4511 My husband and I have been married for over a ... \n",
+ "... ... ... \n",
+ "2519 2553 I feel overprotective about my mother because ... \n",
+ "2522 2557 From Lebanon: I am dealing with a big problem!... \n",
+ "2523 2559 From the U.S.: I am a junior in high school, a... \n",
+ "2526 2563 I am 21 female and have not had any friends fo... \n",
+ "2527 2564 From the U.S.: My brother is 19 years old and ... \n",
+ "\n",
+ " Distorted part \\\n",
+ "0 The voice are always fimilar (someone she know... \n",
+ "1 I feel trapped inside my disgusting self and l... \n",
+ "4 I refused to go because I didn’t know if it wa... \n",
+ "9 I felt like the response was totally irrationa... \n",
+ "10 I thought that he displayed traits of honor, l... \n",
+ "... ... \n",
+ "2519 Since then, whenever my mother is out alone, I... \n",
+ "2522 My family hate him but they didn’t met him at ... \n",
+ "2523 However, I am not happy, at the least only hal... \n",
+ "2526 Now I am at university my peers around me all ... \n",
+ "2527 He claims he’s severely depressed and has outb... \n",
+ "\n",
+ " Dominant Distortion Secondary Distortion (Optional) \n",
+ "0 Personalization NaN \n",
+ "1 Labeling Emotional Reasoning \n",
+ "4 Fortune-telling Emotional Reasoning \n",
+ "9 Magnification NaN \n",
+ "10 Labeling NaN \n",
+ "... ... ... \n",
+ "2519 All-or-nothing thinking Overgeneralization \n",
+ "2522 Magnification NaN \n",
+ "2523 Labeling All-or-nothing thinking \n",
+ "2526 Overgeneralization NaN \n",
+ "2527 Mental filter Mind Reading \n",
+ "\n",
+ "[1597 rows x 5 columns]"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "df = df[df['Dominant Distortion'] != 'No Distortion']\n",
+ "df"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "id": "e14bfea0",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:30:56.364603Z",
+ "iopub.status.busy": "2025-07-31T07:30:56.364387Z",
+ "iopub.status.idle": "2025-07-31T07:30:56.374436Z",
+ "shell.execute_reply": "2025-07-31T07:30:56.373550Z"
+ },
+ "papermill": {
+ "duration": 0.016193,
+ "end_time": "2025-07-31T07:30:56.375717",
+ "exception": false,
+ "start_time": "2025-07-31T07:30:56.359524",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Id_Number | \n",
+ " Patient Question | \n",
+ " Distorted part | \n",
+ " Dominant Distortion | \n",
+ " Secondary Distortion (Optional) | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 0 | \n",
+ " 4500 | \n",
+ " Hello, I have a beautiful,smart,outgoing and a... | \n",
+ " The voice are always fimilar (someone she know... | \n",
+ " Personalization | \n",
+ " NaN | \n",
+ "
\n",
+ " \n",
+ " | 1 | \n",
+ " 4501 | \n",
+ " Since I was about 16 years old I’ve had these ... | \n",
+ " I feel trapped inside my disgusting self and l... | \n",
+ " Labeling | \n",
+ " Emotional Reasoning | \n",
+ "
\n",
+ " \n",
+ " | 4 | \n",
+ " 4504 | \n",
+ " I don’t really know how to explain the situati... | \n",
+ " I refused to go because I didn’t know if it wa... | \n",
+ " Fortune-telling | \n",
+ " Emotional Reasoning | \n",
+ "
\n",
+ " \n",
+ " | 9 | \n",
+ " 4510 | \n",
+ " I have been with my fiancé for two years now.... | \n",
+ " I felt like the response was totally irrationa... | \n",
+ " Magnification | \n",
+ " NaN | \n",
+ "
\n",
+ " \n",
+ " | 10 | \n",
+ " 4511 | \n",
+ " My husband and I have been married for over a ... | \n",
+ " I thought that he displayed traits of honor, l... | \n",
+ " Labeling | \n",
+ " NaN | \n",
+ "
\n",
+ " \n",
+ " | ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ "
\n",
+ " \n",
+ " | 2519 | \n",
+ " 2553 | \n",
+ " I feel overprotective about my mother because ... | \n",
+ " Since then, whenever my mother is out alone, I... | \n",
+ " All-or-nothing thinking | \n",
+ " Overgeneralization | \n",
+ "
\n",
+ " \n",
+ " | 2522 | \n",
+ " 2557 | \n",
+ " From Lebanon: I am dealing with a big problem!... | \n",
+ " My family hate him but they didn’t met him at ... | \n",
+ " Magnification | \n",
+ " NaN | \n",
+ "
\n",
+ " \n",
+ " | 2523 | \n",
+ " 2559 | \n",
+ " From the U.S.: I am a junior in high school, a... | \n",
+ " However, I am not happy, at the least only hal... | \n",
+ " Labeling | \n",
+ " All-or-nothing thinking | \n",
+ "
\n",
+ " \n",
+ " | 2526 | \n",
+ " 2563 | \n",
+ " I am 21 female and have not had any friends fo... | \n",
+ " Now I am at university my peers around me all ... | \n",
+ " Overgeneralization | \n",
+ " NaN | \n",
+ "
\n",
+ " \n",
+ " | 2527 | \n",
+ " 2564 | \n",
+ " From the U.S.: My brother is 19 years old and ... | \n",
+ " He claims he’s severely depressed and has outb... | \n",
+ " Mental filter | \n",
+ " Mind Reading | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
1597 rows × 5 columns
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Id_Number Patient Question \\\n",
+ "0 4500 Hello, I have a beautiful,smart,outgoing and a... \n",
+ "1 4501 Since I was about 16 years old I’ve had these ... \n",
+ "4 4504 I don’t really know how to explain the situati... \n",
+ "9 4510 I have been with my fiancé for two years now.... \n",
+ "10 4511 My husband and I have been married for over a ... \n",
+ "... ... ... \n",
+ "2519 2553 I feel overprotective about my mother because ... \n",
+ "2522 2557 From Lebanon: I am dealing with a big problem!... \n",
+ "2523 2559 From the U.S.: I am a junior in high school, a... \n",
+ "2526 2563 I am 21 female and have not had any friends fo... \n",
+ "2527 2564 From the U.S.: My brother is 19 years old and ... \n",
+ "\n",
+ " Distorted part \\\n",
+ "0 The voice are always fimilar (someone she know... \n",
+ "1 I feel trapped inside my disgusting self and l... \n",
+ "4 I refused to go because I didn’t know if it wa... \n",
+ "9 I felt like the response was totally irrationa... \n",
+ "10 I thought that he displayed traits of honor, l... \n",
+ "... ... \n",
+ "2519 Since then, whenever my mother is out alone, I... \n",
+ "2522 My family hate him but they didn’t met him at ... \n",
+ "2523 However, I am not happy, at the least only hal... \n",
+ "2526 Now I am at university my peers around me all ... \n",
+ "2527 He claims he’s severely depressed and has outb... \n",
+ "\n",
+ " Dominant Distortion Secondary Distortion (Optional) \n",
+ "0 Personalization NaN \n",
+ "1 Labeling Emotional Reasoning \n",
+ "4 Fortune-telling Emotional Reasoning \n",
+ "9 Magnification NaN \n",
+ "10 Labeling NaN \n",
+ "... ... ... \n",
+ "2519 All-or-nothing thinking Overgeneralization \n",
+ "2522 Magnification NaN \n",
+ "2523 Labeling All-or-nothing thinking \n",
+ "2526 Overgeneralization NaN \n",
+ "2527 Mental filter Mind Reading \n",
+ "\n",
+ "[1597 rows x 5 columns]"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "df"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "id": "89f5af91",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:30:56.385670Z",
+ "iopub.status.busy": "2025-07-31T07:30:56.385416Z",
+ "iopub.status.idle": "2025-07-31T07:30:57.404255Z",
+ "shell.execute_reply": "2025-07-31T07:30:57.403257Z"
+ },
+ "papermill": {
+ "duration": 1.025376,
+ "end_time": "2025-07-31T07:30:57.405599",
+ "exception": false,
+ "start_time": "2025-07-31T07:30:56.380223",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "i luv programmng u r gr8 i cant believe its 123 times better\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "[nltk_data] Downloading package punkt to /usr/share/nltk_data...\n",
+ "[nltk_data] Package punkt is already up-to-date!\n",
+ "[nltk_data] Downloading package stopwords to /usr/share/nltk_data...\n",
+ "[nltk_data] Package stopwords is already up-to-date!\n",
+ "[nltk_data] Downloading package wordnet to /usr/share/nltk_data...\n",
+ "[nltk_data] Package wordnet is already up-to-date!\n"
+ ]
+ }
+ ],
+ "source": [
+ "# !pip install spellchecker\n",
+ "import re\n",
+ "import string\n",
+ "import nltk\n",
+ "from nltk.tokenize import word_tokenize\n",
+ "from nltk.corpus import stopwords\n",
+ "from nltk.stem import PorterStemmer, WordNetLemmatizer\n",
+ "# from spellchecker import SpellChecker\n",
+ "\n",
+ "# Tải các tài nguyên cần thiết\n",
+ "nltk.download(\"punkt\")\n",
+ "nltk.download(\"stopwords\")\n",
+ "nltk.download(\"wordnet\")\n",
+ "\n",
+ "# Khởi tạo các công cụ\n",
+ "stemmer = PorterStemmer()\n",
+ "lemmatizer = WordNetLemmatizer()\n",
+ "# spell = SpellChecker()\n",
+ "stop_words = set(stopwords.words(\"english\"))\n",
+ "\n",
+ "def preprocess_text(text, use_stemming=False, use_lemmatization=True, correct_spelling=False):\n",
+ " text = text.lower()\n",
+ " \n",
+ " text = text.translate(str.maketrans(\"\", \"\", string.punctuation))\n",
+ " \n",
+ " # tokens = word_tokenize(text)\n",
+ " \n",
+ " # tokens = [word for word in tokens if word not in stop_words]\n",
+ " \n",
+ " # if use_stemming:\n",
+ " # tokens = [stemmer.stem(word) for word in tokens]\n",
+ " # elif use_lemmatization:\n",
+ " # tokens = [lemmatizer.lemmatize(word) for word in tokens]\n",
+ " \n",
+ " # 7. Xóa khoảng trắng dư thừa (không cần vì token đã tách sẵn)\n",
+ " \n",
+ " # 8. Chuyển đổi số thành \"NUM\"\n",
+ " # tokens = [\"NUM\" if word.isdigit() else word for word in tokens]\n",
+ " \n",
+ " # 9. Xử lý lỗi chính tả\n",
+ " # if correct_spelling:\n",
+ " # tokens = [spell.correction(word) if word not in spell else word for word in tokens]\n",
+ " \n",
+ " return text#\" \".join(text)\n",
+ "\n",
+ "# Ví dụ sử dụng\n",
+ "text = \"I luv programmng! U r gr8. I can't believe it's 123 times better!\"\n",
+ "processed_text = preprocess_text(text)\n",
+ "print(processed_text)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "id": "495f293b",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:30:57.414915Z",
+ "iopub.status.busy": "2025-07-31T07:30:57.414710Z",
+ "iopub.status.idle": "2025-07-31T07:30:57.444182Z",
+ "shell.execute_reply": "2025-07-31T07:30:57.443553Z"
+ },
+ "papermill": {
+ "duration": 0.035306,
+ "end_time": "2025-07-31T07:30:57.445277",
+ "exception": false,
+ "start_time": "2025-07-31T07:30:57.409971",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "df['cleaned'] = df['Distorted part'].map(lambda text: preprocess_text(text))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "id": "469d9017",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:30:57.454280Z",
+ "iopub.status.busy": "2025-07-31T07:30:57.454049Z",
+ "iopub.status.idle": "2025-07-31T07:30:57.463547Z",
+ "shell.execute_reply": "2025-07-31T07:30:57.462800Z"
+ },
+ "papermill": {
+ "duration": 0.015149,
+ "end_time": "2025-07-31T07:30:57.464573",
+ "exception": false,
+ "start_time": "2025-07-31T07:30:57.449424",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Id_Number | \n",
+ " Patient Question | \n",
+ " Distorted part | \n",
+ " Dominant Distortion | \n",
+ " Secondary Distortion (Optional) | \n",
+ " cleaned | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 0 | \n",
+ " 4500 | \n",
+ " Hello, I have a beautiful,smart,outgoing and a... | \n",
+ " The voice are always fimilar (someone she know... | \n",
+ " Personalization | \n",
+ " NaN | \n",
+ " the voice are always fimilar someone she knows... | \n",
+ "
\n",
+ " \n",
+ " | 1 | \n",
+ " 4501 | \n",
+ " Since I was about 16 years old I’ve had these ... | \n",
+ " I feel trapped inside my disgusting self and l... | \n",
+ " Labeling | \n",
+ " Emotional Reasoning | \n",
+ " i feel trapped inside my disgusting self and l... | \n",
+ "
\n",
+ " \n",
+ " | 4 | \n",
+ " 4504 | \n",
+ " I don’t really know how to explain the situati... | \n",
+ " I refused to go because I didn’t know if it wa... | \n",
+ " Fortune-telling | \n",
+ " Emotional Reasoning | \n",
+ " i refused to go because i didn’t know if it wa... | \n",
+ "
\n",
+ " \n",
+ " | 9 | \n",
+ " 4510 | \n",
+ " I have been with my fiancé for two years now.... | \n",
+ " I felt like the response was totally irrationa... | \n",
+ " Magnification | \n",
+ " NaN | \n",
+ " i felt like the response was totally irrationa... | \n",
+ "
\n",
+ " \n",
+ " | 10 | \n",
+ " 4511 | \n",
+ " My husband and I have been married for over a ... | \n",
+ " I thought that he displayed traits of honor, l... | \n",
+ " Labeling | \n",
+ " NaN | \n",
+ " i thought that he displayed traits of honor lo... | \n",
+ "
\n",
+ " \n",
+ " | ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ " ... | \n",
+ "
\n",
+ " \n",
+ " | 2519 | \n",
+ " 2553 | \n",
+ " I feel overprotective about my mother because ... | \n",
+ " Since then, whenever my mother is out alone, I... | \n",
+ " All-or-nothing thinking | \n",
+ " Overgeneralization | \n",
+ " since then whenever my mother is out alone i b... | \n",
+ "
\n",
+ " \n",
+ " | 2522 | \n",
+ " 2557 | \n",
+ " From Lebanon: I am dealing with a big problem!... | \n",
+ " My family hate him but they didn’t met him at ... | \n",
+ " Magnification | \n",
+ " NaN | \n",
+ " my family hate him but they didn’t met him at ... | \n",
+ "
\n",
+ " \n",
+ " | 2523 | \n",
+ " 2559 | \n",
+ " From the U.S.: I am a junior in high school, a... | \n",
+ " However, I am not happy, at the least only hal... | \n",
+ " Labeling | \n",
+ " All-or-nothing thinking | \n",
+ " however i am not happy at the least only half ... | \n",
+ "
\n",
+ " \n",
+ " | 2526 | \n",
+ " 2563 | \n",
+ " I am 21 female and have not had any friends fo... | \n",
+ " Now I am at university my peers around me all ... | \n",
+ " Overgeneralization | \n",
+ " NaN | \n",
+ " now i am at university my peers around me all ... | \n",
+ "
\n",
+ " \n",
+ " | 2527 | \n",
+ " 2564 | \n",
+ " From the U.S.: My brother is 19 years old and ... | \n",
+ " He claims he’s severely depressed and has outb... | \n",
+ " Mental filter | \n",
+ " Mind Reading | \n",
+ " he claims he’s severely depressed and has outb... | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
1597 rows × 6 columns
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Id_Number Patient Question \\\n",
+ "0 4500 Hello, I have a beautiful,smart,outgoing and a... \n",
+ "1 4501 Since I was about 16 years old I’ve had these ... \n",
+ "4 4504 I don’t really know how to explain the situati... \n",
+ "9 4510 I have been with my fiancé for two years now.... \n",
+ "10 4511 My husband and I have been married for over a ... \n",
+ "... ... ... \n",
+ "2519 2553 I feel overprotective about my mother because ... \n",
+ "2522 2557 From Lebanon: I am dealing with a big problem!... \n",
+ "2523 2559 From the U.S.: I am a junior in high school, a... \n",
+ "2526 2563 I am 21 female and have not had any friends fo... \n",
+ "2527 2564 From the U.S.: My brother is 19 years old and ... \n",
+ "\n",
+ " Distorted part \\\n",
+ "0 The voice are always fimilar (someone she know... \n",
+ "1 I feel trapped inside my disgusting self and l... \n",
+ "4 I refused to go because I didn’t know if it wa... \n",
+ "9 I felt like the response was totally irrationa... \n",
+ "10 I thought that he displayed traits of honor, l... \n",
+ "... ... \n",
+ "2519 Since then, whenever my mother is out alone, I... \n",
+ "2522 My family hate him but they didn’t met him at ... \n",
+ "2523 However, I am not happy, at the least only hal... \n",
+ "2526 Now I am at university my peers around me all ... \n",
+ "2527 He claims he’s severely depressed and has outb... \n",
+ "\n",
+ " Dominant Distortion Secondary Distortion (Optional) \\\n",
+ "0 Personalization NaN \n",
+ "1 Labeling Emotional Reasoning \n",
+ "4 Fortune-telling Emotional Reasoning \n",
+ "9 Magnification NaN \n",
+ "10 Labeling NaN \n",
+ "... ... ... \n",
+ "2519 All-or-nothing thinking Overgeneralization \n",
+ "2522 Magnification NaN \n",
+ "2523 Labeling All-or-nothing thinking \n",
+ "2526 Overgeneralization NaN \n",
+ "2527 Mental filter Mind Reading \n",
+ "\n",
+ " cleaned \n",
+ "0 the voice are always fimilar someone she knows... \n",
+ "1 i feel trapped inside my disgusting self and l... \n",
+ "4 i refused to go because i didn’t know if it wa... \n",
+ "9 i felt like the response was totally irrationa... \n",
+ "10 i thought that he displayed traits of honor lo... \n",
+ "... ... \n",
+ "2519 since then whenever my mother is out alone i b... \n",
+ "2522 my family hate him but they didn’t met him at ... \n",
+ "2523 however i am not happy at the least only half ... \n",
+ "2526 now i am at university my peers around me all ... \n",
+ "2527 he claims he’s severely depressed and has outb... \n",
+ "\n",
+ "[1597 rows x 6 columns]"
+ ]
+ },
+ "execution_count": 7,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "df"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "id": "c00caea9",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:30:57.473744Z",
+ "iopub.status.busy": "2025-07-31T07:30:57.473559Z",
+ "iopub.status.idle": "2025-07-31T07:30:57.478796Z",
+ "shell.execute_reply": "2025-07-31T07:30:57.478100Z"
+ },
+ "papermill": {
+ "duration": 0.010926,
+ "end_time": "2025-07-31T07:30:57.479770",
+ "exception": false,
+ "start_time": "2025-07-31T07:30:57.468844",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "{'All-or-nothing thinking': 0, 'Emotional Reasoning': 1, 'Fortune-telling': 2, 'Labeling': 3, 'Magnification': 4, 'Mental filter': 5, 'Mind Reading': 6, 'Overgeneralization': 7, 'Personalization': 8, 'Should statements': 9}\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sklearn.preprocessing import LabelEncoder\n",
+ "\n",
+ "label_encoder = LabelEncoder()\n",
+ "df['labelencode'] = label_encoder.fit_transform(df['Dominant Distortion'])\n",
+ "\n",
+ "label_mapping = dict(zip(label_encoder.classes_, label_encoder.transform(label_encoder.classes_)))\n",
+ "print(label_mapping)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "id": "de6f3e92",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:30:57.488928Z",
+ "iopub.status.busy": "2025-07-31T07:30:57.488730Z",
+ "iopub.status.idle": "2025-07-31T07:30:57.493429Z",
+ "shell.execute_reply": "2025-07-31T07:30:57.492815Z"
+ },
+ "papermill": {
+ "duration": 0.010412,
+ "end_time": "2025-07-31T07:30:57.494441",
+ "exception": false,
+ "start_time": "2025-07-31T07:30:57.484029",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "from sklearn.model_selection import train_test_split\n",
+ "\n",
+ "X_train, X_test, y_train, y_test = train_test_split(df['cleaned'].values,\n",
+ " df['labelencode'].values,\n",
+ " test_size=0.2, random_state=42)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "id": "c6925af3",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:30:57.503620Z",
+ "iopub.status.busy": "2025-07-31T07:30:57.503407Z",
+ "iopub.status.idle": "2025-07-31T07:31:22.008709Z",
+ "shell.execute_reply": "2025-07-31T07:31:22.008043Z"
+ },
+ "papermill": {
+ "duration": 24.5114,
+ "end_time": "2025-07-31T07:31:22.010032",
+ "exception": false,
+ "start_time": "2025-07-31T07:30:57.498632",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "2025-07-31 07:31:11.326196: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
+ "WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n",
+ "E0000 00:00:1753947071.514409 19 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
+ "E0000 00:00:1753947071.569002 19 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n"
+ ]
+ }
+ ],
+ "source": [
+ "import torch\n",
+ "from torch.optim import AdamW \n",
+ "from torch.utils.data import Dataset, DataLoader\n",
+ "from transformers import RobertaTokenizer, RobertaForSequenceClassification\n",
+ "from sklearn.model_selection import train_test_split\n",
+ "from sklearn.metrics import accuracy_score\n",
+ "from transformers import AutoTokenizer, AutoModel"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "id": "dcc4e584",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:31:22.020632Z",
+ "iopub.status.busy": "2025-07-31T07:31:22.020134Z",
+ "iopub.status.idle": "2025-07-31T07:31:22.023685Z",
+ "shell.execute_reply": "2025-07-31T07:31:22.022994Z"
+ },
+ "papermill": {
+ "duration": 0.009946,
+ "end_time": "2025-07-31T07:31:22.024751",
+ "exception": false,
+ "start_time": "2025-07-31T07:31:22.014805",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "# from transformers import AutoTokenizer\n",
+ "\n",
+ "# tokenizer = AutoTokenizer.from_pretrained('roberta-large')\n",
+ "\n",
+ "\n",
+ "# df[\"body_len\"] = df[\"cleaned\"].apply(lambda x: len(tokenizer.encode(x, truncation=False)))\n",
+ "\n",
+ "# avg_summary_len = df[\"body_len\"].mean()\n",
+ "\n",
+ "# print(f\"Độ dài token trung bình của summary: {avg_summary_len:.2f}\")\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "id": "eac3c141",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:31:22.034353Z",
+ "iopub.status.busy": "2025-07-31T07:31:22.034101Z",
+ "iopub.status.idle": "2025-07-31T07:31:22.037644Z",
+ "shell.execute_reply": "2025-07-31T07:31:22.037025Z"
+ },
+ "papermill": {
+ "duration": 0.009443,
+ "end_time": "2025-07-31T07:31:22.038713",
+ "exception": false,
+ "start_time": "2025-07-31T07:31:22.029270",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "# from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, roc_auc_score\n",
+ "# def calculate_results(y_true, y_pred, y_pred_proba=None):\n",
+ "# \"\"\"\n",
+ "# Tính toán các chỉ số đánh giá, bao gồm accuracy, precision, recall, f1 và roc-auc.\n",
+ "# Nếu `y_pred_proba` được cung cấp, tính thêm ROC-AUC cho từng nhãn trong bài toán đa nhãn.\n",
+ "# \"\"\"\n",
+ "# results = {\n",
+ "# \"accuracy\": accuracy_score(y_true, y_pred) * 100,\n",
+ "# \"precision\": precision_score(y_true, y_pred, average='weighted'),\n",
+ "# \"recall\": recall_score(y_true, y_pred, average='weighted'),\n",
+ "# \"f1\": f1_score(y_true, y_pred, average='weighted')\n",
+ "# }\n",
+ " \n",
+ "# # if y_pred_proba is not None:\n",
+ "# # # Chuyển đổi nhãn thành dạng nhị phân\n",
+ "# # y_true_bin = label_binarize(y_true, classes=np.unique(y_true))\n",
+ " \n",
+ "# # # Tính ROC-AUC cho từng nhãn (macro-average)\n",
+ "# # roc_auc_macro = []\n",
+ "# # for i in range(y_true_bin.shape[1]):\n",
+ "# # roc_auc = roc_auc_score(y_true_bin[:, i], y_pred_proba[:, i])\n",
+ "# # roc_auc_macro.append(roc_auc)\n",
+ " \n",
+ "# # # Tính ROC-AUC macro trung bình\n",
+ "# # results[\"roc_auc_macro\"] = np.mean(roc_auc_macro)\n",
+ " \n",
+ "# # # Tính ROC-AUC micro-average\n",
+ "# # roc_auc_micro = roc_auc_score(y_true_bin, y_pred_proba, average=\"micro\")\n",
+ "# # results[\"roc_auc_micro\"] = roc_auc_micro\n",
+ " \n",
+ "# return results"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "id": "a734a14b",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:31:22.047692Z",
+ "iopub.status.busy": "2025-07-31T07:31:22.047504Z",
+ "iopub.status.idle": "2025-07-31T07:31:23.970642Z",
+ "shell.execute_reply": "2025-07-31T07:31:23.969612Z"
+ },
+ "papermill": {
+ "duration": 1.929215,
+ "end_time": "2025-07-31T07:31:23.972033",
+ "exception": false,
+ "start_time": "2025-07-31T07:31:22.042818",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "596be61ac3f34a568ab29218295be87d",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "tokenizer_config.json: 0%| | 0.00/25.0 [00:00, ?B/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "245431e736f348308c699b5a82d14420",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "vocab.json: 0%| | 0.00/899k [00:00, ?B/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "1496dd813200429ba841824970977b40",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "merges.txt: 0%| | 0.00/456k [00:00, ?B/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "795397b977054c118a88104e1cc880a1",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "tokenizer.json: 0%| | 0.00/1.36M [00:00, ?B/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "e4b44926c5ca4c1199a332a0f7da4acd",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "config.json: 0%| | 0.00/482 [00:00, ?B/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from transformers import AutoTokenizer, AutoModelForSequenceClassification\n",
+ "from transformers import RobertaTokenizer, RobertaForSequenceClassification\n",
+ "\n",
+ "tokenizer = RobertaTokenizer.from_pretrained('roberta-large')\n",
+ "# tokenizer = AutoTokenizer.from_pretrained('bert-large-uncased')\n",
+ "\n",
+ "class TextDataset(Dataset):\n",
+ " def __init__(self, texts, labels, tokenizer, max_len=256):\n",
+ " self.texts = texts\n",
+ " self.labels = labels\n",
+ " self.tokenizer = tokenizer\n",
+ " self.max_len = max_len\n",
+ "\n",
+ " def __len__(self):\n",
+ " return len(self.texts)\n",
+ "\n",
+ " def __getitem__(self, idx):\n",
+ " encoding = self.tokenizer(\n",
+ " self.texts[idx],\n",
+ " truncation=True,\n",
+ " padding='max_length',\n",
+ " max_length=self.max_len,\n",
+ " return_tensors='pt'\n",
+ " )\n",
+ " item = {key: val.squeeze(0) for key, val in encoding.items()}\n",
+ " item['labels'] = torch.tensor(self.labels[idx], dtype=torch.long)\n",
+ " return item"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "id": "3457677b",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:31:23.983649Z",
+ "iopub.status.busy": "2025-07-31T07:31:23.982906Z",
+ "iopub.status.idle": "2025-07-31T07:31:23.987052Z",
+ "shell.execute_reply": "2025-07-31T07:31:23.986540Z"
+ },
+ "papermill": {
+ "duration": 0.010795,
+ "end_time": "2025-07-31T07:31:23.988166",
+ "exception": false,
+ "start_time": "2025-07-31T07:31:23.977371",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "train_dataset = TextDataset(X_train, y_train, tokenizer)\n",
+ "test_dataset = TextDataset(X_test, y_test, tokenizer)\n",
+ "\n",
+ "train_loader = DataLoader(train_dataset, batch_size=16, shuffle=True)\n",
+ "test_loader = DataLoader(test_dataset, batch_size=16)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "d8ecf1b5",
+ "metadata": {
+ "papermill": {
+ "duration": 0.004299,
+ "end_time": "2025-07-31T07:31:23.997029",
+ "exception": false,
+ "start_time": "2025-07-31T07:31:23.992730",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "source": [
+ "### Conditional models"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "id": "ed498594",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:31:24.007303Z",
+ "iopub.status.busy": "2025-07-31T07:31:24.007036Z",
+ "iopub.status.idle": "2025-07-31T07:31:24.010557Z",
+ "shell.execute_reply": "2025-07-31T07:31:24.009976Z"
+ },
+ "papermill": {
+ "duration": 0.009594,
+ "end_time": "2025-07-31T07:31:24.011611",
+ "exception": false,
+ "start_time": "2025-07-31T07:31:24.002017",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "# import torch\n",
+ "# import torch.nn as nn\n",
+ "\n",
+ "# class BiLSTMClassifier(nn.Module):\n",
+ "# def __init__(self, vocab_size, embedding_dim, hidden_dim, num_labels, padding_idx=0, dropout=0.3):\n",
+ "# super(BiLSTMClassifier, self).__init__()\n",
+ "# self.embedding = nn.Embedding(vocab_size, embedding_dim, padding_idx=padding_idx)\n",
+ "# self.lstm = nn.LSTM(embedding_dim, hidden_dim, num_layers=1,\n",
+ "# bidirectional=True, batch_first=True)\n",
+ "# self.dropout = nn.Dropout(dropout)\n",
+ "# self.classifier = nn.Linear(hidden_dim * 2, num_labels) # BiLSTM: hidden_dim * 2\n",
+ "\n",
+ "# def forward(self, input_ids, attention_mask=None):\n",
+ "# embedded = self.embedding(input_ids) # [B, T, E]\n",
+ "# lstm_out, _ = self.lstm(embedded) # [B, T, H*2]\n",
+ "# # Lấy ra vector tại vị trí cuối cùng có attention_mask = 1 (nếu có mask)\n",
+ "# if attention_mask is not None:\n",
+ "# lengths = attention_mask.sum(dim=1) - 1 # vị trí cuối có token\n",
+ "# last_outputs = lstm_out[torch.arange(lstm_out.size(0)), lengths]\n",
+ "# else:\n",
+ "# last_outputs = lstm_out[:, -1, :]\n",
+ "# out = self.dropout(last_outputs)\n",
+ "# return self.classifier(out)\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "id": "eccbce05",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:31:24.021799Z",
+ "iopub.status.busy": "2025-07-31T07:31:24.021590Z",
+ "iopub.status.idle": "2025-07-31T07:31:24.025159Z",
+ "shell.execute_reply": "2025-07-31T07:31:24.024656Z"
+ },
+ "papermill": {
+ "duration": 0.009823,
+ "end_time": "2025-07-31T07:31:24.026191",
+ "exception": false,
+ "start_time": "2025-07-31T07:31:24.016368",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "# from sklearn.metrics import classification_report, accuracy_score\n",
+ "# from torch.optim import AdamW\n",
+ "\n",
+ "# # Khởi tạo mô hình\n",
+ "# model = BiLSTMClassifier(\n",
+ "# vocab_size=tokenizer.vocab_size,\n",
+ "# embedding_dim=768,\n",
+ "# hidden_dim=768,\n",
+ "# num_labels=len(set(y_train))\n",
+ "# ).to(device)\n",
+ "\n",
+ "# optimizer = AdamW(model.parameters(), lr=2e-4)\n",
+ "# criterion = nn.CrossEntropyLoss()\n",
+ "\n",
+ "# # Train + Eval loop\n",
+ "# for epoch in range(20):\n",
+ "# model.train()\n",
+ "# total_loss = 0\n",
+ " \n",
+ "# for batch in train_loader:\n",
+ "# input_ids = batch['input_ids'].to(device)\n",
+ "# labels = batch['labels'].to(device)\n",
+ "# attention_mask = batch.get('attention_mask', None)\n",
+ "# if attention_mask is not None:\n",
+ "# attention_mask = attention_mask.to(device)\n",
+ "\n",
+ "# optimizer.zero_grad()\n",
+ "# outputs = model(input_ids=input_ids, attention_mask=attention_mask)\n",
+ "# loss = criterion(outputs, labels)\n",
+ "# loss.backward()\n",
+ "# optimizer.step()\n",
+ "# total_loss += loss.item()\n",
+ " \n",
+ "# # Evaluation\n",
+ "# model.eval()\n",
+ "# all_preds = []\n",
+ "# all_labels = []\n",
+ "\n",
+ "# with torch.no_grad():\n",
+ "# for batch in test_loader:\n",
+ "# input_ids = batch['input_ids'].to(device)\n",
+ "# labels = batch['labels'].to(device)\n",
+ "# attention_mask = batch.get('attention_mask', None)\n",
+ "# if attention_mask is not None:\n",
+ "# attention_mask = attention_mask.to(device)\n",
+ "\n",
+ "# outputs = model(input_ids=input_ids, attention_mask=attention_mask)\n",
+ "# preds = torch.argmax(outputs, dim=1)\n",
+ "# all_preds.extend(preds.cpu().numpy())\n",
+ "# all_labels.extend(labels.cpu().numpy())\n",
+ "\n",
+ "# accuracy = accuracy_score(all_labels, all_preds)\n",
+ "# report = classification_report(all_labels, all_preds)\n",
+ "# print(f\"Epoch {epoch+1}\")\n",
+ "# print(f\"Loss: {total_loss / len(train_loader):.4f}\")\n",
+ "# print(f\"Accuracy: {accuracy:.4f}\")\n",
+ "# print(report)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "bf4d977f",
+ "metadata": {
+ "papermill": {
+ "duration": 0.004252,
+ "end_time": "2025-07-31T07:31:24.035118",
+ "exception": false,
+ "start_time": "2025-07-31T07:31:24.030866",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "source": [
+ "### Attention-based models"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "id": "e53a3b8f",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:31:24.044794Z",
+ "iopub.status.busy": "2025-07-31T07:31:24.044591Z",
+ "iopub.status.idle": "2025-07-31T07:31:29.955710Z",
+ "shell.execute_reply": "2025-07-31T07:31:29.954490Z"
+ },
+ "papermill": {
+ "duration": 5.917952,
+ "end_time": "2025-07-31T07:31:29.957530",
+ "exception": false,
+ "start_time": "2025-07-31T07:31:24.039578",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "Xet Storage is enabled for this repo, but the 'hf_xet' package is not installed. Falling back to regular HTTP download. For better performance, install the package with: `pip install huggingface_hub[hf_xet]` or `pip install hf_xet`\n"
+ ]
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "521e10dedafe4b4c9a41931c3a38e9cc",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "model.safetensors: 0%| | 0.00/1.42G [00:00, ?B/s]"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "Some weights of RobertaForSequenceClassification were not initialized from the model checkpoint at roberta-large and are newly initialized: ['classifier.dense.bias', 'classifier.dense.weight', 'classifier.out_proj.bias', 'classifier.out_proj.weight']\n",
+ "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "RobertaForSequenceClassification(\n",
+ " (roberta): RobertaModel(\n",
+ " (embeddings): RobertaEmbeddings(\n",
+ " (word_embeddings): Embedding(50265, 1024, padding_idx=1)\n",
+ " (position_embeddings): Embedding(514, 1024, padding_idx=1)\n",
+ " (token_type_embeddings): Embedding(1, 1024)\n",
+ " (LayerNorm): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (encoder): RobertaEncoder(\n",
+ " (layer): ModuleList(\n",
+ " (0-23): 24 x RobertaLayer(\n",
+ " (attention): RobertaAttention(\n",
+ " (self): RobertaSdpaSelfAttention(\n",
+ " (query): Linear(in_features=1024, out_features=1024, bias=True)\n",
+ " (key): Linear(in_features=1024, out_features=1024, bias=True)\n",
+ " (value): Linear(in_features=1024, out_features=1024, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " (output): RobertaSelfOutput(\n",
+ " (dense): Linear(in_features=1024, out_features=1024, bias=True)\n",
+ " (LayerNorm): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " (intermediate): RobertaIntermediate(\n",
+ " (dense): Linear(in_features=1024, out_features=4096, bias=True)\n",
+ " (intermediate_act_fn): GELUActivation()\n",
+ " )\n",
+ " (output): RobertaOutput(\n",
+ " (dense): Linear(in_features=4096, out_features=1024, bias=True)\n",
+ " (LayerNorm): LayerNorm((1024,), eps=1e-05, elementwise_affine=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " )\n",
+ " )\n",
+ " )\n",
+ " )\n",
+ " )\n",
+ " (classifier): RobertaClassificationHead(\n",
+ " (dense): Linear(in_features=1024, out_features=1024, bias=True)\n",
+ " (dropout): Dropout(p=0.1, inplace=False)\n",
+ " (out_proj): Linear(in_features=1024, out_features=10, bias=True)\n",
+ " )\n",
+ ")"
+ ]
+ },
+ "execution_count": 17,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n",
+ "\n",
+ "model = RobertaForSequenceClassification.from_pretrained(\n",
+ " 'roberta-large',\n",
+ " num_labels=len(set(y_train)) # số lượng nhãn\n",
+ ")\n",
+ "# model = AutoModelForSequenceClassification.from_pretrained(\n",
+ "# 'bert-large-uncased',\n",
+ "# num_labels=len(set(y_train)) # số lượng nhãn\n",
+ "# )\n",
+ "model.to(device)\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "id": "05e65036",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T07:31:29.972415Z",
+ "iopub.status.busy": "2025-07-31T07:31:29.971960Z",
+ "iopub.status.idle": "2025-07-31T08:07:40.097372Z",
+ "shell.execute_reply": "2025-07-31T08:07:40.096566Z"
+ },
+ "papermill": {
+ "duration": 2170.139101,
+ "end_time": "2025-07-31T08:07:40.105408",
+ "exception": false,
+ "start_time": "2025-07-31T07:31:29.966307",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Accuracy: 0.1594\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.00 0.00 0.00 15\n",
+ " 1 0.00 0.00 0.00 30\n",
+ " 2 0.00 0.00 0.00 24\n",
+ " 3 0.00 0.00 0.00 40\n",
+ " 4 0.00 0.00 0.00 37\n",
+ " 5 0.00 0.00 0.00 13\n",
+ " 6 1.00 0.02 0.04 54\n",
+ " 7 0.16 1.00 0.27 50\n",
+ " 8 0.00 0.00 0.00 39\n",
+ " 9 0.00 0.00 0.00 18\n",
+ "\n",
+ " accuracy 0.16 320\n",
+ " macro avg 0.12 0.10 0.03 320\n",
+ "weighted avg 0.19 0.16 0.05 320\n",
+ "\n",
+ "Epoch 1, Loss: 2.3119\n",
+ "Accuracy: 0.3063\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.00 0.00 0.00 15\n",
+ " 1 0.00 0.00 0.00 30\n",
+ " 2 0.55 0.25 0.34 24\n",
+ " 3 0.41 0.17 0.25 40\n",
+ " 4 0.21 0.59 0.31 37\n",
+ " 5 0.00 0.00 0.00 13\n",
+ " 6 0.53 0.43 0.47 54\n",
+ " 7 0.28 0.78 0.41 50\n",
+ " 8 0.00 0.00 0.00 39\n",
+ " 9 1.00 0.06 0.11 18\n",
+ "\n",
+ " accuracy 0.31 320\n",
+ " macro avg 0.30 0.23 0.19 320\n",
+ "weighted avg 0.31 0.31 0.24 320\n",
+ "\n",
+ "Epoch 2, Loss: 2.1933\n",
+ "Accuracy: 0.4313\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.00 0.00 0.00 15\n",
+ " 1 0.00 0.00 0.00 30\n",
+ " 2 0.43 0.67 0.52 24\n",
+ " 3 0.51 0.60 0.55 40\n",
+ " 4 0.25 0.73 0.37 37\n",
+ " 5 0.00 0.00 0.00 13\n",
+ " 6 0.76 0.52 0.62 54\n",
+ " 7 0.53 0.34 0.41 50\n",
+ " 8 0.50 0.46 0.48 39\n",
+ " 9 0.42 0.44 0.43 18\n",
+ "\n",
+ " accuracy 0.43 320\n",
+ " macro avg 0.34 0.38 0.34 320\n",
+ "weighted avg 0.42 0.43 0.40 320\n",
+ "\n",
+ "Epoch 3, Loss: 1.7082\n",
+ "Accuracy: 0.4281\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.24 0.27 0.25 15\n",
+ " 1 0.80 0.13 0.23 30\n",
+ " 2 0.41 0.58 0.48 24\n",
+ " 3 0.52 0.57 0.55 40\n",
+ " 4 0.53 0.22 0.31 37\n",
+ " 5 0.24 0.31 0.27 13\n",
+ " 6 0.68 0.56 0.61 54\n",
+ " 7 0.46 0.38 0.42 50\n",
+ " 8 0.26 0.59 0.36 39\n",
+ " 9 0.57 0.44 0.50 18\n",
+ "\n",
+ " accuracy 0.43 320\n",
+ " macro avg 0.47 0.41 0.40 320\n",
+ "weighted avg 0.50 0.43 0.42 320\n",
+ "\n",
+ "Epoch 4, Loss: 0.9923\n",
+ "Accuracy: 0.4594\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.27 0.20 0.23 15\n",
+ " 1 0.61 0.37 0.46 30\n",
+ " 2 0.69 0.38 0.49 24\n",
+ " 3 0.58 0.55 0.56 40\n",
+ " 4 0.39 0.35 0.37 37\n",
+ " 5 0.17 0.46 0.25 13\n",
+ " 6 0.76 0.59 0.67 54\n",
+ " 7 0.35 0.58 0.43 50\n",
+ " 8 0.52 0.33 0.41 39\n",
+ " 9 0.43 0.50 0.46 18\n",
+ "\n",
+ " accuracy 0.46 320\n",
+ " macro avg 0.48 0.43 0.43 320\n",
+ "weighted avg 0.52 0.46 0.47 320\n",
+ "\n",
+ "Epoch 5, Loss: 0.3317\n",
+ "Accuracy: 0.4375\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.12 0.13 0.12 15\n",
+ " 1 0.52 0.47 0.49 30\n",
+ " 2 0.60 0.50 0.55 24\n",
+ " 3 0.83 0.25 0.38 40\n",
+ " 4 0.40 0.32 0.36 37\n",
+ " 5 0.14 0.62 0.23 13\n",
+ " 6 0.63 0.63 0.63 54\n",
+ " 7 0.45 0.44 0.44 50\n",
+ " 8 0.46 0.41 0.43 39\n",
+ " 9 0.50 0.56 0.53 18\n",
+ "\n",
+ " accuracy 0.44 320\n",
+ " macro avg 0.46 0.43 0.42 320\n",
+ "weighted avg 0.52 0.44 0.45 320\n",
+ "\n",
+ "Epoch 6, Loss: 0.0763\n",
+ "Accuracy: 0.4500\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.14 0.13 0.14 15\n",
+ " 1 0.50 0.40 0.44 30\n",
+ " 2 0.41 0.50 0.45 24\n",
+ " 3 0.58 0.47 0.52 40\n",
+ " 4 0.38 0.30 0.33 37\n",
+ " 5 0.14 0.31 0.19 13\n",
+ " 6 0.64 0.72 0.68 54\n",
+ " 7 0.45 0.40 0.43 50\n",
+ " 8 0.50 0.38 0.43 39\n",
+ " 9 0.37 0.56 0.44 18\n",
+ "\n",
+ " accuracy 0.45 320\n",
+ " macro avg 0.41 0.42 0.41 320\n",
+ "weighted avg 0.47 0.45 0.45 320\n",
+ "\n",
+ "Epoch 7, Loss: 0.0185\n",
+ "Accuracy: 0.4594\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.15 0.20 0.17 15\n",
+ " 1 0.40 0.53 0.46 30\n",
+ " 2 0.48 0.50 0.49 24\n",
+ " 3 0.62 0.50 0.56 40\n",
+ " 4 0.33 0.38 0.35 37\n",
+ " 5 0.21 0.38 0.27 13\n",
+ " 6 0.64 0.65 0.64 54\n",
+ " 7 0.53 0.40 0.45 50\n",
+ " 8 0.57 0.33 0.42 39\n",
+ " 9 0.45 0.50 0.47 18\n",
+ "\n",
+ " accuracy 0.46 320\n",
+ " macro avg 0.44 0.44 0.43 320\n",
+ "weighted avg 0.49 0.46 0.47 320\n",
+ "\n",
+ "Epoch 8, Loss: 0.0075\n",
+ "Accuracy: 0.4531\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.18 0.27 0.22 15\n",
+ " 1 0.45 0.43 0.44 30\n",
+ " 2 0.48 0.50 0.49 24\n",
+ " 3 0.59 0.47 0.53 40\n",
+ " 4 0.35 0.38 0.36 37\n",
+ " 5 0.15 0.31 0.21 13\n",
+ " 6 0.64 0.65 0.64 54\n",
+ " 7 0.48 0.44 0.46 50\n",
+ " 8 0.52 0.33 0.41 39\n",
+ " 9 0.45 0.50 0.47 18\n",
+ "\n",
+ " accuracy 0.45 320\n",
+ " macro avg 0.43 0.43 0.42 320\n",
+ "weighted avg 0.48 0.45 0.46 320\n",
+ "\n",
+ "Epoch 9, Loss: 0.0042\n",
+ "Accuracy: 0.4625\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.20 0.27 0.23 15\n",
+ " 1 0.45 0.43 0.44 30\n",
+ " 2 0.55 0.50 0.52 24\n",
+ " 3 0.62 0.50 0.56 40\n",
+ " 4 0.34 0.38 0.36 37\n",
+ " 5 0.15 0.31 0.20 13\n",
+ " 6 0.64 0.69 0.66 54\n",
+ " 7 0.49 0.44 0.46 50\n",
+ " 8 0.50 0.33 0.40 39\n",
+ " 9 0.45 0.50 0.47 18\n",
+ "\n",
+ " accuracy 0.46 320\n",
+ " macro avg 0.44 0.43 0.43 320\n",
+ "weighted avg 0.49 0.46 0.47 320\n",
+ "\n",
+ "Epoch 10, Loss: 0.0031\n",
+ "Accuracy: 0.4656\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.21 0.27 0.24 15\n",
+ " 1 0.46 0.43 0.45 30\n",
+ " 2 0.55 0.50 0.52 24\n",
+ " 3 0.61 0.50 0.55 40\n",
+ " 4 0.35 0.38 0.36 37\n",
+ " 5 0.15 0.31 0.20 13\n",
+ " 6 0.64 0.70 0.67 54\n",
+ " 7 0.48 0.44 0.46 50\n",
+ " 8 0.50 0.33 0.40 39\n",
+ " 9 0.45 0.50 0.47 18\n",
+ "\n",
+ " accuracy 0.47 320\n",
+ " macro avg 0.44 0.44 0.43 320\n",
+ "weighted avg 0.49 0.47 0.47 320\n",
+ "\n",
+ "Epoch 11, Loss: 0.0026\n",
+ "Accuracy: 0.4656\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.21 0.27 0.24 15\n",
+ " 1 0.46 0.43 0.45 30\n",
+ " 2 0.55 0.50 0.52 24\n",
+ " 3 0.61 0.50 0.55 40\n",
+ " 4 0.35 0.38 0.36 37\n",
+ " 5 0.15 0.31 0.20 13\n",
+ " 6 0.64 0.70 0.67 54\n",
+ " 7 0.48 0.44 0.46 50\n",
+ " 8 0.50 0.33 0.40 39\n",
+ " 9 0.45 0.50 0.47 18\n",
+ "\n",
+ " accuracy 0.47 320\n",
+ " macro avg 0.44 0.44 0.43 320\n",
+ "weighted avg 0.49 0.47 0.47 320\n",
+ "\n",
+ "Epoch 12, Loss: 0.0022\n",
+ "Accuracy: 0.4688\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.21 0.27 0.24 15\n",
+ " 1 0.48 0.43 0.46 30\n",
+ " 2 0.55 0.50 0.52 24\n",
+ " 3 0.62 0.53 0.57 40\n",
+ " 4 0.37 0.41 0.38 37\n",
+ " 5 0.15 0.31 0.20 13\n",
+ " 6 0.63 0.70 0.67 54\n",
+ " 7 0.48 0.42 0.45 50\n",
+ " 8 0.50 0.33 0.40 39\n",
+ " 9 0.45 0.50 0.47 18\n",
+ "\n",
+ " accuracy 0.47 320\n",
+ " macro avg 0.44 0.44 0.44 320\n",
+ "weighted avg 0.49 0.47 0.47 320\n",
+ "\n",
+ "Epoch 13, Loss: 0.0019\n",
+ "Accuracy: 0.4719\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.21 0.27 0.24 15\n",
+ " 1 0.50 0.43 0.46 30\n",
+ " 2 0.55 0.50 0.52 24\n",
+ " 3 0.62 0.53 0.57 40\n",
+ " 4 0.38 0.41 0.39 37\n",
+ " 5 0.15 0.31 0.20 13\n",
+ " 6 0.63 0.70 0.67 54\n",
+ " 7 0.49 0.44 0.46 50\n",
+ " 8 0.50 0.33 0.40 39\n",
+ " 9 0.43 0.50 0.46 18\n",
+ "\n",
+ " accuracy 0.47 320\n",
+ " macro avg 0.44 0.44 0.44 320\n",
+ "weighted avg 0.49 0.47 0.48 320\n",
+ "\n",
+ "Epoch 14, Loss: 0.0017\n",
+ "Accuracy: 0.4719\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.21 0.27 0.24 15\n",
+ " 1 0.50 0.43 0.46 30\n",
+ " 2 0.55 0.50 0.52 24\n",
+ " 3 0.62 0.53 0.57 40\n",
+ " 4 0.38 0.41 0.39 37\n",
+ " 5 0.15 0.31 0.20 13\n",
+ " 6 0.63 0.70 0.67 54\n",
+ " 7 0.49 0.44 0.46 50\n",
+ " 8 0.50 0.33 0.40 39\n",
+ " 9 0.43 0.50 0.46 18\n",
+ "\n",
+ " accuracy 0.47 320\n",
+ " macro avg 0.44 0.44 0.44 320\n",
+ "weighted avg 0.49 0.47 0.48 320\n",
+ "\n",
+ "Epoch 15, Loss: 0.0015\n",
+ "Accuracy: 0.4719\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.21 0.27 0.24 15\n",
+ " 1 0.50 0.43 0.46 30\n",
+ " 2 0.55 0.50 0.52 24\n",
+ " 3 0.62 0.53 0.57 40\n",
+ " 4 0.38 0.41 0.39 37\n",
+ " 5 0.15 0.31 0.20 13\n",
+ " 6 0.63 0.70 0.67 54\n",
+ " 7 0.48 0.44 0.46 50\n",
+ " 8 0.50 0.33 0.40 39\n",
+ " 9 0.43 0.50 0.46 18\n",
+ "\n",
+ " accuracy 0.47 320\n",
+ " macro avg 0.44 0.44 0.44 320\n",
+ "weighted avg 0.49 0.47 0.48 320\n",
+ "\n",
+ "Epoch 16, Loss: 0.0014\n",
+ "Accuracy: 0.4719\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.21 0.27 0.24 15\n",
+ " 1 0.52 0.47 0.49 30\n",
+ " 2 0.55 0.50 0.52 24\n",
+ " 3 0.64 0.53 0.58 40\n",
+ " 4 0.38 0.41 0.39 37\n",
+ " 5 0.15 0.31 0.20 13\n",
+ " 6 0.62 0.70 0.66 54\n",
+ " 7 0.47 0.42 0.44 50\n",
+ " 8 0.50 0.33 0.40 39\n",
+ " 9 0.43 0.50 0.46 18\n",
+ "\n",
+ " accuracy 0.47 320\n",
+ " macro avg 0.45 0.44 0.44 320\n",
+ "weighted avg 0.49 0.47 0.48 320\n",
+ "\n",
+ "Epoch 17, Loss: 0.0012\n",
+ "Accuracy: 0.4719\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.21 0.27 0.24 15\n",
+ " 1 0.54 0.47 0.50 30\n",
+ " 2 0.52 0.50 0.51 24\n",
+ " 3 0.64 0.53 0.58 40\n",
+ " 4 0.38 0.41 0.39 37\n",
+ " 5 0.15 0.31 0.20 13\n",
+ " 6 0.62 0.70 0.66 54\n",
+ " 7 0.47 0.42 0.44 50\n",
+ " 8 0.50 0.33 0.40 39\n",
+ " 9 0.43 0.50 0.46 18\n",
+ "\n",
+ " accuracy 0.47 320\n",
+ " macro avg 0.45 0.44 0.44 320\n",
+ "weighted avg 0.49 0.47 0.48 320\n",
+ "\n",
+ "Epoch 18, Loss: 0.0011\n",
+ "Accuracy: 0.4719\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.21 0.27 0.24 15\n",
+ " 1 0.54 0.47 0.50 30\n",
+ " 2 0.52 0.50 0.51 24\n",
+ " 3 0.64 0.53 0.58 40\n",
+ " 4 0.38 0.41 0.39 37\n",
+ " 5 0.15 0.31 0.20 13\n",
+ " 6 0.62 0.70 0.66 54\n",
+ " 7 0.47 0.42 0.44 50\n",
+ " 8 0.50 0.33 0.40 39\n",
+ " 9 0.43 0.50 0.46 18\n",
+ "\n",
+ " accuracy 0.47 320\n",
+ " macro avg 0.45 0.44 0.44 320\n",
+ "weighted avg 0.49 0.47 0.48 320\n",
+ "\n",
+ "Epoch 19, Loss: 0.0010\n",
+ "Accuracy: 0.4719\n",
+ " precision recall f1-score support\n",
+ "\n",
+ " 0 0.21 0.27 0.24 15\n",
+ " 1 0.54 0.47 0.50 30\n",
+ " 2 0.52 0.50 0.51 24\n",
+ " 3 0.64 0.53 0.58 40\n",
+ " 4 0.38 0.41 0.39 37\n",
+ " 5 0.15 0.31 0.20 13\n",
+ " 6 0.62 0.70 0.66 54\n",
+ " 7 0.47 0.42 0.44 50\n",
+ " 8 0.50 0.33 0.40 39\n",
+ " 9 0.43 0.50 0.46 18\n",
+ "\n",
+ " accuracy 0.47 320\n",
+ " macro avg 0.45 0.44 0.44 320\n",
+ "weighted avg 0.49 0.47 0.48 320\n",
+ "\n",
+ "Epoch 20, Loss: 0.0009\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sklearn.metrics import classification_report\n",
+ "optimizer = AdamW(model.parameters(), lr=2e-5)\n",
+ "\n",
+ "model.train()\n",
+ "for epoch in range(20):\n",
+ " total_loss = 0\n",
+ " for batch in train_loader:\n",
+ " input_ids = batch['input_ids'].to(device)\n",
+ " attention_mask = batch['attention_mask'].to(device)\n",
+ " labels = batch['labels'].to(device)\n",
+ "\n",
+ " optimizer.zero_grad()\n",
+ " outputs = model(input_ids=input_ids, attention_mask=attention_mask, labels=labels)\n",
+ " loss = outputs.loss\n",
+ " loss.backward()\n",
+ " optimizer.step()\n",
+ "\n",
+ " total_loss += loss.item()\n",
+ " model.eval()\n",
+ " all_preds = []\n",
+ " all_labels = []\n",
+ " \n",
+ " with torch.no_grad():\n",
+ " for batch in test_loader:\n",
+ " input_ids = batch['input_ids'].to(device)\n",
+ " attention_mask = batch['attention_mask'].to(device)\n",
+ " labels = batch['labels'].to(device)\n",
+ " \n",
+ " outputs = model(input_ids=input_ids, attention_mask=attention_mask)\n",
+ " preds = torch.argmax(outputs.logits, dim=1)\n",
+ " \n",
+ " all_preds.extend(preds.cpu().numpy())\n",
+ " all_labels.extend(labels.cpu().numpy())\n",
+ " \n",
+ " accuracy = accuracy_score(all_labels, all_preds)\n",
+ " report = classification_report(all_labels, all_preds)\n",
+ " print(f\"Accuracy: {accuracy:.4f}\")\n",
+ " print(report)\n",
+ " print(f\"Epoch {epoch+1}, Loss: {total_loss/len(train_loader):.4f}\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "id": "0f5c19f6",
+ "metadata": {
+ "execution": {
+ "iopub.execute_input": "2025-07-31T08:07:40.119159Z",
+ "iopub.status.busy": "2025-07-31T08:07:40.118925Z",
+ "iopub.status.idle": "2025-07-31T08:07:40.122600Z",
+ "shell.execute_reply": "2025-07-31T08:07:40.122080Z"
+ },
+ "papermill": {
+ "duration": 0.011896,
+ "end_time": "2025-07-31T08:07:40.123730",
+ "exception": false,
+ "start_time": "2025-07-31T08:07:40.111834",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "# from sklearn.metrics import classification_report\n",
+ "# # from torch.nn.utils import clip_grad_norm_\n",
+ "\n",
+ "# accumulation_steps = 2\n",
+ "# optimizer = AdamW(model.parameters(), lr=2e-5)\n",
+ "\n",
+ "# model.train()\n",
+ "# for epoch in range(20):\n",
+ "# total_loss = 0\n",
+ "# model.train()\n",
+ " \n",
+ "# for step, batch in enumerate(train_loader):\n",
+ "# input_ids = batch['input_ids'].to(device)\n",
+ "# attention_mask = batch['attention_mask'].to(device)\n",
+ "# labels = batch['labels'].to(device)\n",
+ "\n",
+ "# outputs = model(input_ids=input_ids, attention_mask=attention_mask, labels=labels)\n",
+ "# loss = outputs.loss / accumulation_steps # normalize loss\n",
+ "# loss.backward()\n",
+ "\n",
+ "# if (step + 1) % accumulation_steps == 0 or (step + 1) == len(train_loader):\n",
+ "# # Optionally clip gradients\n",
+ "# # clip_grad_norm_(model.parameters(), max_norm=1.0)\n",
+ "# optimizer.step()\n",
+ "# optimizer.zero_grad()\n",
+ " \n",
+ "# total_loss += loss.item() * accumulation_steps # multiply to restore original loss\n",
+ "\n",
+ "# model.eval()\n",
+ "# all_preds = []\n",
+ "# all_labels = []\n",
+ "\n",
+ "# with torch.no_grad():\n",
+ "# for batch in test_loader:\n",
+ "# input_ids = batch['input_ids'].to(device)\n",
+ "# attention_mask = batch['attention_mask'].to(device)\n",
+ "# labels = batch['labels'].to(device)\n",
+ "\n",
+ "# outputs = model(input_ids=input_ids, attention_mask=attention_mask)\n",
+ "# preds = torch.argmax(outputs.logits, dim=1)\n",
+ "\n",
+ "# all_preds.extend(preds.cpu().numpy())\n",
+ "# all_labels.extend(labels.cpu().numpy())\n",
+ "\n",
+ "# accuracy = accuracy_score(all_labels, all_preds)\n",
+ "# report = classification_report(all_labels, all_preds)\n",
+ "# print(f\"Epoch {epoch+1} | Loss: {total_loss/len(train_loader):.4f} | Accuracy: {accuracy:.4f}\")\n",
+ "# print(report)\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "def1c5f3",
+ "metadata": {
+ "papermill": {
+ "duration": 0.006078,
+ "end_time": "2025-07-31T08:07:40.135881",
+ "exception": false,
+ "start_time": "2025-07-31T08:07:40.129803",
+ "status": "completed"
+ },
+ "tags": []
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kaggle": {
+ "accelerator": "gpu",
+ "dataSources": [
+ {
+ "datasetId": 7300211,
+ "sourceId": 11635176,
+ "sourceType": "datasetVersion"
+ },
+ {
+ "datasetId": 7306834,
+ "sourceId": 11644305,
+ "sourceType": "datasetVersion"
+ }
+ ],
+ "dockerImageVersionId": 31011,
+ "isGpuEnabled": true,
+ "isInternetEnabled": true,
+ "language": "python",
+ "sourceType": "notebook"
+ },
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.11.11"
+ },
+ "papermill": {
+ "default_parameters": {},
+ "duration": 2214.290918,
+ "end_time": "2025-07-31T08:07:43.274710",
+ "environment_variables": {},
+ "exception": null,
+ "input_path": "__notebook__.ipynb",
+ "output_path": "__notebook__.ipynb",
+ "parameters": {},
+ "start_time": "2025-07-31T07:30:48.983792",
+ "version": "2.6.0"
+ },
+ "widgets": {
+ "application/vnd.jupyter.widget-state+json": {
+ "state": {
+ "05d381367d7d4145a9a6b3cd5b942d26": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "0adad4128e1449aea7988d0dd01e36c3": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "background": null,
+ "description_width": "",
+ "font_size": null,
+ "text_color": null
+ }
+ },
+ "1162b3c15be94448a6b31f034feac0fc": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_294509e9029a48b09da21142de47f2a9",
+ "placeholder": "",
+ "style": "IPY_MODEL_0adad4128e1449aea7988d0dd01e36c3",
+ "tabbable": null,
+ "tooltip": null,
+ "value": "tokenizer.json: 100%"
+ }
+ },
+ "13fcbc617b4046c4961d8415bd856d41": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "1496dd813200429ba841824970977b40": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HBoxModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_15843ab6eb9b45db9acf978d25ddc2e4",
+ "IPY_MODEL_51fd4ccf546f4f68a25d1bf3ba5469dd",
+ "IPY_MODEL_deeb66da5fc549d2bd548fe7dee3cc0c"
+ ],
+ "layout": "IPY_MODEL_5febd6baff5a46eba128b026f80a6503",
+ "tabbable": null,
+ "tooltip": null
+ }
+ },
+ "15843ab6eb9b45db9acf978d25ddc2e4": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_841587a0cec34ef19302f87b6e399d1a",
+ "placeholder": "",
+ "style": "IPY_MODEL_2d6522f2fd724932b4cd7059dde8ed9b",
+ "tabbable": null,
+ "tooltip": null,
+ "value": "merges.txt: 100%"
+ }
+ },
+ "19899b87b2de4114b8cdec060e333b99": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "1ae0e64e9ad448b4890f048b392092c9": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "1f0a87507e544fdeb7e73e9eb95cf398": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "20cf5ce2285049c688ffdecf7cfa7255": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "ProgressStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "245431e736f348308c699b5a82d14420": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HBoxModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_3825ecf911e444cdbe1cda0ac8018999",
+ "IPY_MODEL_9b0b47c991ea4305bfb4b58b36bce0cc",
+ "IPY_MODEL_52b14c39f26e43b49a0912effcd12f76"
+ ],
+ "layout": "IPY_MODEL_a09b9e0e026649d5a1dfd74a7d50830f",
+ "tabbable": null,
+ "tooltip": null
+ }
+ },
+ "293cbe470bc84cb3b783cc2219899600": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "ProgressStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "294509e9029a48b09da21142de47f2a9": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "2a2ba7b291374605b5e7bc5d06aaaaf8": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "2c7c46263b854b7e9a4913df10571a7c": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "background": null,
+ "description_width": "",
+ "font_size": null,
+ "text_color": null
+ }
+ },
+ "2d6522f2fd724932b4cd7059dde8ed9b": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "background": null,
+ "description_width": "",
+ "font_size": null,
+ "text_color": null
+ }
+ },
+ "336bb649328140e7b8739134425fb215": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "3825ecf911e444cdbe1cda0ac8018999": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_908a13ca45794710aa17c8199d8a784a",
+ "placeholder": "",
+ "style": "IPY_MODEL_b91992daa72543aa9b4e75c8046ec1dd",
+ "tabbable": null,
+ "tooltip": null,
+ "value": "vocab.json: 100%"
+ }
+ },
+ "3f57e97556b44acca5c1a254c7b72a5e": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "background": null,
+ "description_width": "",
+ "font_size": null,
+ "text_color": null
+ }
+ },
+ "4f039e69c7c14d55bc2b1945ac26d58b": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "ProgressStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "51fd4ccf546f4f68a25d1bf3ba5469dd": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "FloatProgressModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_550c47cd18e04a5cb66c221fae3859aa",
+ "max": 456318.0,
+ "min": 0.0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_b05b6b57737545a793603257178c52b4",
+ "tabbable": null,
+ "tooltip": null,
+ "value": 456318.0
+ }
+ },
+ "521e10dedafe4b4c9a41931c3a38e9cc": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HBoxModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_a1b1964fb56e4cb3a43e123547c32096",
+ "IPY_MODEL_5f3ad5243a254211874810e56a9f3cb9",
+ "IPY_MODEL_97484afa30034bc193a6a82cd099d2f9"
+ ],
+ "layout": "IPY_MODEL_6ea60069695745198e5be7f32e9408ea",
+ "tabbable": null,
+ "tooltip": null
+ }
+ },
+ "52b14c39f26e43b49a0912effcd12f76": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_c76e629d32f2499db5a238ff537ddcd7",
+ "placeholder": "",
+ "style": "IPY_MODEL_b00cb9bf3a61475fa658b7c7b698b015",
+ "tabbable": null,
+ "tooltip": null,
+ "value": " 899k/899k [00:00<00:00, 4.68MB/s]"
+ }
+ },
+ "550c47cd18e04a5cb66c221fae3859aa": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "56f818df32e342bfb74d19803dbb9a6e": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "596be61ac3f34a568ab29218295be87d": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HBoxModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_c5830355eecf4b5daef3a74a9b1c15a1",
+ "IPY_MODEL_644fbe043ee94bc69ba3309e9703125a",
+ "IPY_MODEL_7cd3dd31eaa343c09c7af11c1bdcbeed"
+ ],
+ "layout": "IPY_MODEL_56f818df32e342bfb74d19803dbb9a6e",
+ "tabbable": null,
+ "tooltip": null
+ }
+ },
+ "5f3ad5243a254211874810e56a9f3cb9": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "FloatProgressModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_e01ba05d0a9c4e388fb01c59b8761f66",
+ "max": 1421700479.0,
+ "min": 0.0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_9b64f3e524f64ce9b06f5124493a5bb0",
+ "tabbable": null,
+ "tooltip": null,
+ "value": 1421700479.0
+ }
+ },
+ "5febd6baff5a46eba128b026f80a6503": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "644fbe043ee94bc69ba3309e9703125a": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "FloatProgressModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_2a2ba7b291374605b5e7bc5d06aaaaf8",
+ "max": 25.0,
+ "min": 0.0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_4f039e69c7c14d55bc2b1945ac26d58b",
+ "tabbable": null,
+ "tooltip": null,
+ "value": 25.0
+ }
+ },
+ "675dfa48deba4773b472aeddc780e033": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "6879d70644cf4040837c0f68cf3f7001": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_336bb649328140e7b8739134425fb215",
+ "placeholder": "",
+ "style": "IPY_MODEL_866f85a8ed724b378748baad6d396712",
+ "tabbable": null,
+ "tooltip": null,
+ "value": " 1.36M/1.36M [00:00<00:00, 5.22MB/s]"
+ }
+ },
+ "6c60b0e86a9445428b8481819cfd2aa6": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_1ae0e64e9ad448b4890f048b392092c9",
+ "placeholder": "",
+ "style": "IPY_MODEL_3f57e97556b44acca5c1a254c7b72a5e",
+ "tabbable": null,
+ "tooltip": null,
+ "value": " 482/482 [00:00<00:00, 61.8kB/s]"
+ }
+ },
+ "6ea60069695745198e5be7f32e9408ea": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "71cf3f0146b5400fb77004ecd8ad496e": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "FloatProgressModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_19899b87b2de4114b8cdec060e333b99",
+ "max": 1355863.0,
+ "min": 0.0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_7665eb22cf974ba093bf7d919c6d2776",
+ "tabbable": null,
+ "tooltip": null,
+ "value": 1355863.0
+ }
+ },
+ "71d8a23bc3f244539e02c1ac447af9b5": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "7665eb22cf974ba093bf7d919c6d2776": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "ProgressStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "795397b977054c118a88104e1cc880a1": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HBoxModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_1162b3c15be94448a6b31f034feac0fc",
+ "IPY_MODEL_71cf3f0146b5400fb77004ecd8ad496e",
+ "IPY_MODEL_6879d70644cf4040837c0f68cf3f7001"
+ ],
+ "layout": "IPY_MODEL_675dfa48deba4773b472aeddc780e033",
+ "tabbable": null,
+ "tooltip": null
+ }
+ },
+ "7cd3dd31eaa343c09c7af11c1bdcbeed": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_bb7fd5a9328d4d42aa8803c0f50727aa",
+ "placeholder": "",
+ "style": "IPY_MODEL_e2c96673ff1f4a8a9b2663a01ddce005",
+ "tabbable": null,
+ "tooltip": null,
+ "value": " 25.0/25.0 [00:00<00:00, 2.97kB/s]"
+ }
+ },
+ "841587a0cec34ef19302f87b6e399d1a": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "866f85a8ed724b378748baad6d396712": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "background": null,
+ "description_width": "",
+ "font_size": null,
+ "text_color": null
+ }
+ },
+ "87f93e59c95b4706bd8346f81af03dba": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_e394e087405d43e39d5c8f107a6972c7",
+ "placeholder": "",
+ "style": "IPY_MODEL_b3e9cb281964418dbe90079a66669b44",
+ "tabbable": null,
+ "tooltip": null,
+ "value": "config.json: 100%"
+ }
+ },
+ "8b42c36b3d9f4ae5b9a0454c9168a0fa": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "background": null,
+ "description_width": "",
+ "font_size": null,
+ "text_color": null
+ }
+ },
+ "908a13ca45794710aa17c8199d8a784a": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "91fb1c2a856a4196877d4464a4370654": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "97484afa30034bc193a6a82cd099d2f9": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_1f0a87507e544fdeb7e73e9eb95cf398",
+ "placeholder": "",
+ "style": "IPY_MODEL_d649653775c745018d31448d51ce7a1a",
+ "tabbable": null,
+ "tooltip": null,
+ "value": " 1.42G/1.42G [00:04<00:00, 331MB/s]"
+ }
+ },
+ "9b0b47c991ea4305bfb4b58b36bce0cc": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "FloatProgressModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_eaf6d31ae03f4337b8cd9ada1411902a",
+ "max": 898823.0,
+ "min": 0.0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_20cf5ce2285049c688ffdecf7cfa7255",
+ "tabbable": null,
+ "tooltip": null,
+ "value": 898823.0
+ }
+ },
+ "9b64f3e524f64ce9b06f5124493a5bb0": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "ProgressStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "a09b9e0e026649d5a1dfd74a7d50830f": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "a1b1964fb56e4cb3a43e123547c32096": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_13fcbc617b4046c4961d8415bd856d41",
+ "placeholder": "",
+ "style": "IPY_MODEL_2c7c46263b854b7e9a4913df10571a7c",
+ "tabbable": null,
+ "tooltip": null,
+ "value": "model.safetensors: 100%"
+ }
+ },
+ "b00cb9bf3a61475fa658b7c7b698b015": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "background": null,
+ "description_width": "",
+ "font_size": null,
+ "text_color": null
+ }
+ },
+ "b05b6b57737545a793603257178c52b4": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "ProgressStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "ProgressStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "bar_color": null,
+ "description_width": ""
+ }
+ },
+ "b3e9cb281964418dbe90079a66669b44": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "background": null,
+ "description_width": "",
+ "font_size": null,
+ "text_color": null
+ }
+ },
+ "b91992daa72543aa9b4e75c8046ec1dd": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "background": null,
+ "description_width": "",
+ "font_size": null,
+ "text_color": null
+ }
+ },
+ "bb7fd5a9328d4d42aa8803c0f50727aa": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "c5830355eecf4b5daef3a74a9b1c15a1": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_91fb1c2a856a4196877d4464a4370654",
+ "placeholder": "",
+ "style": "IPY_MODEL_8b42c36b3d9f4ae5b9a0454c9168a0fa",
+ "tabbable": null,
+ "tooltip": null,
+ "value": "tokenizer_config.json: 100%"
+ }
+ },
+ "c76e629d32f2499db5a238ff537ddcd7": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "c8ae3d52949441edb776e88bbd2a0475": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "cfa2041973bb497ea3c6c9e737331afe": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "FloatProgressModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "FloatProgressModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "ProgressView",
+ "bar_style": "success",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_c8ae3d52949441edb776e88bbd2a0475",
+ "max": 482.0,
+ "min": 0.0,
+ "orientation": "horizontal",
+ "style": "IPY_MODEL_293cbe470bc84cb3b783cc2219899600",
+ "tabbable": null,
+ "tooltip": null,
+ "value": 482.0
+ }
+ },
+ "d1cb7c7962674a2eac9159850554fd40": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "background": null,
+ "description_width": "",
+ "font_size": null,
+ "text_color": null
+ }
+ },
+ "d649653775c745018d31448d51ce7a1a": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "background": null,
+ "description_width": "",
+ "font_size": null,
+ "text_color": null
+ }
+ },
+ "deeb66da5fc549d2bd548fe7dee3cc0c": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HTMLView",
+ "description": "",
+ "description_allow_html": false,
+ "layout": "IPY_MODEL_05d381367d7d4145a9a6b3cd5b942d26",
+ "placeholder": "",
+ "style": "IPY_MODEL_d1cb7c7962674a2eac9159850554fd40",
+ "tabbable": null,
+ "tooltip": null,
+ "value": " 456k/456k [00:00<00:00, 3.54MB/s]"
+ }
+ },
+ "e01ba05d0a9c4e388fb01c59b8761f66": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "e2c96673ff1f4a8a9b2663a01ddce005": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HTMLStyleModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HTMLStyleModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "StyleView",
+ "background": null,
+ "description_width": "",
+ "font_size": null,
+ "text_color": null
+ }
+ },
+ "e394e087405d43e39d5c8f107a6972c7": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ },
+ "e4b44926c5ca4c1199a332a0f7da4acd": {
+ "model_module": "@jupyter-widgets/controls",
+ "model_module_version": "2.0.0",
+ "model_name": "HBoxModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/controls",
+ "_model_module_version": "2.0.0",
+ "_model_name": "HBoxModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/controls",
+ "_view_module_version": "2.0.0",
+ "_view_name": "HBoxView",
+ "box_style": "",
+ "children": [
+ "IPY_MODEL_87f93e59c95b4706bd8346f81af03dba",
+ "IPY_MODEL_cfa2041973bb497ea3c6c9e737331afe",
+ "IPY_MODEL_6c60b0e86a9445428b8481819cfd2aa6"
+ ],
+ "layout": "IPY_MODEL_71d8a23bc3f244539e02c1ac447af9b5",
+ "tabbable": null,
+ "tooltip": null
+ }
+ },
+ "eaf6d31ae03f4337b8cd9ada1411902a": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "2.0.0",
+ "model_name": "LayoutModel",
+ "state": {
+ "_model_module": "@jupyter-widgets/base",
+ "_model_module_version": "2.0.0",
+ "_model_name": "LayoutModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/base",
+ "_view_module_version": "2.0.0",
+ "_view_name": "LayoutView",
+ "align_content": null,
+ "align_items": null,
+ "align_self": null,
+ "border_bottom": null,
+ "border_left": null,
+ "border_right": null,
+ "border_top": null,
+ "bottom": null,
+ "display": null,
+ "flex": null,
+ "flex_flow": null,
+ "grid_area": null,
+ "grid_auto_columns": null,
+ "grid_auto_flow": null,
+ "grid_auto_rows": null,
+ "grid_column": null,
+ "grid_gap": null,
+ "grid_row": null,
+ "grid_template_areas": null,
+ "grid_template_columns": null,
+ "grid_template_rows": null,
+ "height": null,
+ "justify_content": null,
+ "justify_items": null,
+ "left": null,
+ "margin": null,
+ "max_height": null,
+ "max_width": null,
+ "min_height": null,
+ "min_width": null,
+ "object_fit": null,
+ "object_position": null,
+ "order": null,
+ "overflow": null,
+ "padding": null,
+ "right": null,
+ "top": null,
+ "visibility": null,
+ "width": null
+ }
+ }
+ },
+ "version_major": 2,
+ "version_minor": 0
+ }
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}