Update seq2seq.ipynb

This commit is contained in:
Mateusz Grzegorzewski 2024-06-01 19:46:41 +02:00
parent 42c89699db
commit 5176808d85

View File

@ -2,7 +2,7 @@
"cells": [ "cells": [
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": 20,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -23,7 +23,11 @@
"from torch.utils.data import TensorDataset, DataLoader, RandomSampler\n", "from torch.utils.data import TensorDataset, DataLoader, RandomSampler\n",
"\n", "\n",
"import matplotlib.pyplot as plt\n", "import matplotlib.pyplot as plt\n",
"import matplotlib.ticker as ticker" "import matplotlib.ticker as ticker\n",
"\n",
"import pandas as pd\n",
"from nltk.translate.bleu_score import corpus_bleu, SmoothingFunction\n",
"import nltk"
] ]
}, },
{ {
@ -579,9 +583,6 @@
} }
], ],
"source": [ "source": [
"import pandas as pd\n",
"from nltk.translate.bleu_score import corpus_bleu, SmoothingFunction\n",
"import nltk\n",
"nltk.download('punkt')\n", "nltk.download('punkt')\n",
"\n", "\n",
"def filter_data(data, max_length, prefixes):\n", "def filter_data(data, max_length, prefixes):\n",