{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "a9a3a647", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "WARNING:tensorflow:From C:\\Users\\karti\\anaconda3\\Lib\\site-packages\\keras\\src\\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead.\n", "\n" ] } ], "source": [ "import os\n", "import pandas as pd\n", "import tensorflow as tf\n", "import numpy as np" ] }, { "cell_type": "code", "execution_count": 167, "id": "52960768", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | id | \n", "comment_text | \n", "toxic | \n", "severe_toxic | \n", "obscene | \n", "threat | \n", "insult | \n", "identity_hate | \n", "
---|---|---|---|---|---|---|---|---|
0 | \n", "0000997932d777bf | \n", "Explanation\\nWhy the edits made under my usern... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "
1 | \n", "000103f0d9cfb60f | \n", "D'aww! He matches this background colour I'm s... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "
2 | \n", "000113f07ec002fd | \n", "Hey man, I'm really not trying to edit war. It... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "
3 | \n", "0001b41b1c6bb37e | \n", "\"\\nMore\\nI can't make any real suggestions on ... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "
4 | \n", "0001d958c54c6e35 | \n", "You, sir, are my hero. Any chance you remember... | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "