{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"!pip install livelossplot","metadata":{"execution":{"iopub.status.busy":"2022-07-19T15:52:38.746261Z","iopub.execute_input":"2022-07-19T15:52:38.746992Z","iopub.status.idle":"2022-07-19T15:52:50.534636Z","shell.execute_reply.started":"2022-07-19T15:52:38.746891Z","shell.execute_reply":"2022-07-19T15:52:50.533452Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import os\nimport tensorflow as tf\nimport pandas as pd\nfrom tensorflow.keras import layers,models\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom livelossplot import PlotLossesKeras\nfrom keras.preprocessing.image import load_img\nimport random","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-07-19T16:06:15.724169Z","iopub.execute_input":"2022-07-19T16:06:15.724671Z","iopub.status.idle":"2022-07-19T16:06:15.735317Z","shell.execute_reply.started":"2022-07-19T16:06:15.724630Z","shell.execute_reply":"2022-07-19T16:06:15.734239Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!ls ../input/dogs-vs-cats\n","metadata":{"execution":{"iopub.status.busy":"2022-07-19T15:53:01.485891Z","iopub.execute_input":"2022-07-19T15:53:01.486525Z","iopub.status.idle":"2022-07-19T15:53:02.156322Z","shell.execute_reply.started":"2022-07-19T15:53:01.486485Z","shell.execute_reply":"2022-07-19T15:53:02.155228Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!mkdir datasets","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# unzipping test and train files\n!unzip -q ../input/dogs-vs-cats/train.zip -d /kaggle/working/datasets/\n!unzip -q ../input/dogs-vs-cats/test1.zip -d /kaggle/working/datasets/","metadata":{"execution":{"iopub.status.busy":"2022-07-19T15:53:06.035261Z","iopub.execute_input":"2022-07-19T15:53:06.036330Z","iopub.status.idle":"2022-07-19T15:53:16.777121Z","shell.execute_reply.started":"2022-07-19T15:53:06.036266Z","shell.execute_reply":"2022-07-19T15:53:16.775905Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!mkdir datasets/train/dog\n!mkdir datasets/train/cat\n","metadata":{"execution":{"iopub.status.busy":"2022-07-19T15:57:42.327299Z","iopub.execute_input":"2022-07-19T15:57:42.328187Z","iopub.status.idle":"2022-07-19T15:57:43.670458Z","shell.execute_reply.started":"2022-07-19T15:57:42.328117Z","shell.execute_reply":"2022-07-19T15:57:43.669105Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"IMAGE_SIZE=128\nCHANNELS=3","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:14:19.629976Z","iopub.execute_input":"2022-07-19T16:14:19.630360Z","iopub.status.idle":"2022-07-19T16:14:19.634679Z","shell.execute_reply.started":"2022-07-19T16:14:19.630327Z","shell.execute_reply":"2022-07-19T16:14:19.633615Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data_list = os.listdir(\"./datasets/train\")\n\nfor word in data_list:\n    if word ==\"cat\" or word==\"dog\":\n        continue\n    if \"cat\" in word:\n        os.system(f\"mv ./datasets/train/{word} ./datasets/train/cat\")\n    elif \"dog\" in word:\n        os.system(f\"mv ./datasets/train/{word} ./datasets/train/dog\")\n\n","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:00:51.626126Z","iopub.execute_input":"2022-07-19T16:00:51.626920Z","iopub.status.idle":"2022-07-19T16:01:58.801222Z","shell.execute_reply.started":"2022-07-19T16:00:51.626878Z","shell.execute_reply":"2022-07-19T16:01:58.799962Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"input_path = []\nlabel = []\n\nfor class_name in os.listdir(\"./datasets/train\"):\n    for path in os.listdir(\"./datasets/train/\"+class_name):\n        if class_name == 'cat':\n            label.append(0)\n        else:\n            label.append(1)\n        input_path.append(os.path.join(\"./datasets/train/\", class_name, path))\nprint(input_path[0], label[0])","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:03:58.615900Z","iopub.execute_input":"2022-07-19T16:03:58.616341Z","iopub.status.idle":"2022-07-19T16:03:58.699799Z","shell.execute_reply.started":"2022-07-19T16:03:58.616302Z","shell.execute_reply":"2022-07-19T16:03:58.698837Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = pd.DataFrame()\ndf['images'] = input_path\ndf['label'] = label\ndf = df.sample(frac=1).reset_index(drop=True)\ndf.head()","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:04:28.085643Z","iopub.execute_input":"2022-07-19T16:04:28.086008Z","iopub.status.idle":"2022-07-19T16:04:28.143486Z","shell.execute_reply.started":"2022-07-19T16:04:28.085975Z","shell.execute_reply":"2022-07-19T16:04:28.142534Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for i in df['images']:\n    if '.jpg' not in i:\n        print(i)","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:04:43.525687Z","iopub.execute_input":"2022-07-19T16:04:43.526034Z","iopub.status.idle":"2022-07-19T16:04:43.538305Z","shell.execute_reply.started":"2022-07-19T16:04:43.526002Z","shell.execute_reply":"2022-07-19T16:04:43.537156Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# to display grid of images\nplt.figure(figsize=(25,25))\ntemp = df[df['label']==1]['images']\nstart = random.randint(0, len(temp))\nfiles = temp[start:start+25]\n\nfor index, file in enumerate(files):\n    plt.subplot(5,5, index+1)\n    img = load_img(file)\n    img = np.array(img)\n    plt.imshow(img)\n    plt.title('Dogs')\n    plt.axis('off')","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:06:19.862615Z","iopub.execute_input":"2022-07-19T16:06:19.863341Z","iopub.status.idle":"2022-07-19T16:06:21.865934Z","shell.execute_reply.started":"2022-07-19T16:06:19.863300Z","shell.execute_reply":"2022-07-19T16:06:21.862405Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"rescale_and_resize=tf.keras.Sequential([\n    layers.experimental.preprocessing.Resizing(IMAGE_SIZE,IMAGE_SIZE) ,# will resize to the IMAGE_SIZE if there's any issue\n    layers.experimental.preprocessing.Rescaling(1./255)  # Normalization\n])","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# to display grid of images\nplt.figure(figsize=(25,25))\ntemp = df[df['label']==0]['images']\nstart = random.randint(0, len(temp))\nfiles = temp[start:start+25]\n\nfor index, file in enumerate(files):\n    plt.subplot(5,5, index+1)\n    img = load_img(file)\n    img = np.array(img)\n    plt.imshow(img)\n    plt.title('Cats')\n    plt.axis('off')","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:06:51.257264Z","iopub.execute_input":"2022-07-19T16:06:51.257619Z","iopub.status.idle":"2022-07-19T16:06:53.495620Z","shell.execute_reply.started":"2022-07-19T16:06:51.257589Z","shell.execute_reply":"2022-07-19T16:06:53.494378Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import seaborn as sns\nsns.countplot(df['label'])","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:07:10.125905Z","iopub.execute_input":"2022-07-19T16:07:10.126369Z","iopub.status.idle":"2022-07-19T16:07:10.609293Z","shell.execute_reply.started":"2022-07-19T16:07:10.126332Z","shell.execute_reply":"2022-07-19T16:07:10.608217Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df['label'] = df['label'].astype('str')","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:07:21.577790Z","iopub.execute_input":"2022-07-19T16:07:21.578206Z","iopub.status.idle":"2022-07-19T16:07:21.607275Z","shell.execute_reply.started":"2022-07-19T16:07:21.578153Z","shell.execute_reply":"2022-07-19T16:07:21.606160Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.head()","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:07:31.716708Z","iopub.execute_input":"2022-07-19T16:07:31.717105Z","iopub.status.idle":"2022-07-19T16:07:31.728342Z","shell.execute_reply.started":"2022-07-19T16:07:31.717071Z","shell.execute_reply":"2022-07-19T16:07:31.726889Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# input split\nfrom sklearn.model_selection import train_test_split\ntrain, test = train_test_split(df, test_size=0.2, random_state=42)","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:09:29.716839Z","iopub.execute_input":"2022-07-19T16:09:29.717610Z","iopub.status.idle":"2022-07-19T16:09:29.830415Z","shell.execute_reply.started":"2022-07-19T16:09:29.717569Z","shell.execute_reply":"2022-07-19T16:09:29.829370Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from keras.preprocessing.image import ImageDataGenerator\ntrain_generator = ImageDataGenerator(\n    rescale = 1./255,  # normalization of images\n    rotation_range = 40, # augmention of images to avoid overfitting\n    shear_range = 0.2,\n    zoom_range = 0.2,\n    horizontal_flip = True,\n    fill_mode = 'nearest'\n)\n\nval_generator = ImageDataGenerator(rescale = 1./255)\n\ntrain_iterator = train_generator.flow_from_dataframe(\n    train, \n    x_col='images', \n    y_col='label', \n    target_size=(128,128), \n    batch_size=512, \n    class_mode='binary'\n)\n\nval_iterator = val_generator.flow_from_dataframe(\n    test, \n    x_col='images', \n    y_col='label', \n    target_size=(128,128), \n    batch_size=512, \n    class_mode='binary'\n)","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:09:31.714173Z","iopub.execute_input":"2022-07-19T16:09:31.714783Z","iopub.status.idle":"2022-07-19T16:09:32.109177Z","shell.execute_reply.started":"2022-07-19T16:09:31.714738Z","shell.execute_reply":"2022-07-19T16:09:32.108158Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"input_shape = ( IMAGE_SIZE, IMAGE_SIZE, CHANNELS)\nn_classes = 2\n\n\nmodel = models.Sequential([\n   \n    \n    layers.Conv2D(32, kernel_size = (3,3), activation='relu', input_shape=input_shape),\n    layers.MaxPooling2D((2, 2)),\n    \n    layers.Conv2D(64,  kernel_size = (3,3), activation='relu'),\n    layers.MaxPooling2D((2, 2)),\n    \n    #layers.Conv2D(64,  kernel_size = (3,3), activation='relu'),\n    #layers.MaxPooling2D((2, 2)),\n    \n    #layers.Conv2D(64, (3, 3), activation='relu'),\n   # layers.MaxPooling2D((2, 2)),\n    \n    #layers.Conv2D(64, (3, 3), activation='relu'),\n    #layers.MaxPooling2D((2, 2)),\n    \n   # layers.Conv2D(64, (3, 3), activation='relu'),\n    #layers.MaxPooling2D((2, 2)),\n    \n    layers.Flatten(),\n    layers.Dense(512, activation='relu'),\n    layers.Dense(1, activation='sigmoid'),\n])\n\nmodel.build(input_shape=input_shape)","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:14:30.525624Z","iopub.execute_input":"2022-07-19T16:14:30.525999Z","iopub.status.idle":"2022-07-19T16:14:33.289469Z","shell.execute_reply.started":"2022-07-19T16:14:30.525962Z","shell.execute_reply":"2022-07-19T16:14:33.288330Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"model.summary()","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:14:37.290291Z","iopub.execute_input":"2022-07-19T16:14:37.290913Z","iopub.status.idle":"2022-07-19T16:14:37.296986Z","shell.execute_reply.started":"2022-07-19T16:14:37.290865Z","shell.execute_reply":"2022-07-19T16:14:37.295939Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])\n","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:14:52.883305Z","iopub.execute_input":"2022-07-19T16:14:52.883668Z","iopub.status.idle":"2022-07-19T16:14:52.900078Z","shell.execute_reply.started":"2022-07-19T16:14:52.883636Z","shell.execute_reply":"2022-07-19T16:14:52.899227Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#model training\nhistory = model.fit(\n    train_iterator,\n \n    validation_data=val_iterator,\n    verbose=1,\n    epochs=10,\n    callbacks=[PlotLossesKeras()]\n    \n)","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:15:45.920107Z","iopub.execute_input":"2022-07-19T16:15:45.921081Z","iopub.status.idle":"2022-07-19T16:37:52.644209Z","shell.execute_reply.started":"2022-07-19T16:15:45.921041Z","shell.execute_reply":"2022-07-19T16:37:52.643053Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission_file = pd.read_csv(\"../input/dogs-vs-cats/sampleSubmission.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:46:19.438689Z","iopub.execute_input":"2022-07-19T16:46:19.439041Z","iopub.status.idle":"2022-07-19T16:46:19.454011Z","shell.execute_reply.started":"2022-07-19T16:46:19.439009Z","shell.execute_reply":"2022-07-19T16:46:19.453098Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"submission_file.head()","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:46:24.409589Z","iopub.execute_input":"2022-07-19T16:46:24.409941Z","iopub.status.idle":"2022-07-19T16:46:24.421311Z","shell.execute_reply.started":"2022-07-19T16:46:24.409910Z","shell.execute_reply":"2022-07-19T16:46:24.420178Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"input_path = []\n\n\nfor class_name in os.listdir(\"./datasets/test1\"):\n    input_path.append(os.path.join(\"./datasets/test1/\", class_name))\nprint(input_path[0])","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:53:36.901612Z","iopub.execute_input":"2022-07-19T16:53:36.901997Z","iopub.status.idle":"2022-07-19T16:53:36.938766Z","shell.execute_reply.started":"2022-07-19T16:53:36.901966Z","shell.execute_reply":"2022-07-19T16:53:36.937840Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_df = pd.DataFrame()\ntest_df['images'] = input_path\n\ntest_df = test_df.sample(frac=1).reset_index(drop=True)\ntest_df.head()","metadata":{"execution":{"iopub.status.busy":"2022-07-19T16:54:29.954479Z","iopub.execute_input":"2022-07-19T16:54:29.954912Z","iopub.status.idle":"2022-07-19T16:54:29.979542Z","shell.execute_reply.started":"2022-07-19T16:54:29.954857Z","shell.execute_reply":"2022-07-19T16:54:29.978503Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_df.head()\nlabels = [\"Null\" for i in range(len(test_df))]\ntest_df[\"label\"]=labels","metadata":{"execution":{"iopub.status.busy":"2022-07-19T17:21:30.615945Z","iopub.execute_input":"2022-07-19T17:21:30.616329Z","iopub.status.idle":"2022-07-19T17:21:30.625700Z","shell.execute_reply.started":"2022-07-19T17:21:30.616297Z","shell.execute_reply":"2022-07-19T17:21:30.624524Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_df.head()","metadata":{"execution":{"iopub.status.busy":"2022-07-19T17:21:34.238734Z","iopub.execute_input":"2022-07-19T17:21:34.239080Z","iopub.status.idle":"2022-07-19T17:21:34.252847Z","shell.execute_reply.started":"2022-07-19T17:21:34.239051Z","shell.execute_reply":"2022-07-19T17:21:34.249455Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_generator = ImageDataGenerator(rescale = 1./255)\n\ntest_iterator = test_generator.flow_from_dataframe(\n    test_df, \n    x_col='images',\n    y_col=\"label\",\n    target_size=(128,128), \n    batch_size=512, \n    \n)","metadata":{"execution":{"iopub.status.busy":"2022-07-19T17:21:36.100071Z","iopub.execute_input":"2022-07-19T17:21:36.100768Z","iopub.status.idle":"2022-07-19T17:21:36.222288Z","shell.execute_reply.started":"2022-07-19T17:21:36.100732Z","shell.execute_reply":"2022-07-19T17:21:36.221235Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_labels = model.predict(test_iterator)","metadata":{"execution":{"iopub.status.busy":"2022-07-19T17:23:18.595113Z","iopub.execute_input":"2022-07-19T17:23:18.595508Z","iopub.status.idle":"2022-07-19T17:24:00.967914Z","shell.execute_reply.started":"2022-07-19T17:23:18.595476Z","shell.execute_reply":"2022-07-19T17:24:00.966748Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_labels=test_labels.reshape(-1,)","metadata":{"execution":{"iopub.status.busy":"2022-07-19T17:25:14.935429Z","iopub.execute_input":"2022-07-19T17:25:14.935965Z","iopub.status.idle":"2022-07-19T17:25:14.945281Z","shell.execute_reply.started":"2022-07-19T17:25:14.935919Z","shell.execute_reply":"2022-07-19T17:25:14.944254Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_labels[0:5]","metadata":{"execution":{"iopub.status.busy":"2022-07-19T17:26:28.753411Z","iopub.execute_input":"2022-07-19T17:26:28.754219Z","iopub.status.idle":"2022-07-19T17:26:28.762302Z","shell.execute_reply.started":"2022-07-19T17:26:28.754146Z","shell.execute_reply":"2022-07-19T17:26:28.761140Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_labels_1= [round(i) for i in test_labels]","metadata":{"execution":{"iopub.status.busy":"2022-07-19T17:29:28.658766Z","iopub.execute_input":"2022-07-19T17:29:28.659122Z","iopub.status.idle":"2022-07-19T17:29:28.691011Z","shell.execute_reply.started":"2022-07-19T17:29:28.659092Z","shell.execute_reply":"2022-07-19T17:29:28.690184Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_labels_1[0:5]","metadata":{"execution":{"iopub.status.busy":"2022-07-19T17:29:36.568653Z","iopub.execute_input":"2022-07-19T17:29:36.569003Z","iopub.status.idle":"2022-07-19T17:29:36.576319Z","shell.execute_reply.started":"2022-07-19T17:29:36.568973Z","shell.execute_reply":"2022-07-19T17:29:36.575159Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_df[\"label\"]=test_labels_1","metadata":{"execution":{"iopub.status.busy":"2022-07-19T17:29:54.202302Z","iopub.execute_input":"2022-07-19T17:29:54.203408Z","iopub.status.idle":"2022-07-19T17:29:54.212872Z","shell.execute_reply.started":"2022-07-19T17:29:54.203361Z","shell.execute_reply":"2022-07-19T17:29:54.211916Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_df.head()","metadata":{"execution":{"iopub.status.busy":"2022-07-19T17:29:55.856868Z","iopub.execute_input":"2022-07-19T17:29:55.857757Z","iopub.status.idle":"2022-07-19T17:29:55.872001Z","shell.execute_reply.started":"2022-07-19T17:29:55.857712Z","shell.execute_reply":"2022-07-19T17:29:55.870579Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"id = test_df[\"images\"][0]","metadata":{"execution":{"iopub.status.busy":"2022-07-19T17:31:43.837112Z","iopub.execute_input":"2022-07-19T17:31:43.838000Z","iopub.status.idle":"2022-07-19T17:31:43.842610Z","shell.execute_reply.started":"2022-07-19T17:31:43.837965Z","shell.execute_reply":"2022-07-19T17:31:43.841418Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_ids=[]\nfor i in range(len(test_df)):\n    id = test_df[\"images\"][i]\n    id = id.split(\"/\")\n    id=id[3]\n    id = id.split('.')\n    id=id[0]\n    test_ids.append(id)","metadata":{"execution":{"iopub.status.busy":"2022-07-19T17:33:16.524667Z","iopub.execute_input":"2022-07-19T17:33:16.525088Z","iopub.status.idle":"2022-07-19T17:33:16.626904Z","shell.execute_reply.started":"2022-07-19T17:33:16.525055Z","shell.execute_reply":"2022-07-19T17:33:16.625884Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_df[\"id\"]=test_ids\ntest_df.head()\n","metadata":{"execution":{"iopub.status.busy":"2022-07-19T17:33:49.375397Z","iopub.execute_input":"2022-07-19T17:33:49.375986Z","iopub.status.idle":"2022-07-19T17:33:49.393129Z","shell.execute_reply.started":"2022-07-19T17:33:49.375942Z","shell.execute_reply":"2022-07-19T17:33:49.392160Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_df=test_df.drop(\"images\",axis=1)","metadata":{"execution":{"iopub.status.busy":"2022-07-19T17:34:18.510731Z","iopub.execute_input":"2022-07-19T17:34:18.511078Z","iopub.status.idle":"2022-07-19T17:34:18.517523Z","shell.execute_reply.started":"2022-07-19T17:34:18.511048Z","shell.execute_reply":"2022-07-19T17:34:18.516231Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_df.head()","metadata":{"execution":{"iopub.status.busy":"2022-07-19T17:34:20.216373Z","iopub.execute_input":"2022-07-19T17:34:20.216977Z","iopub.status.idle":"2022-07-19T17:34:20.226871Z","shell.execute_reply.started":"2022-07-19T17:34:20.216941Z","shell.execute_reply":"2022-07-19T17:34:20.225808Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_df.to_csv(\"kaggle_submission.csv\",index=False,header=True)","metadata":{"execution":{"iopub.status.busy":"2022-07-19T17:35:58.280554Z","iopub.execute_input":"2022-07-19T17:35:58.280910Z","iopub.status.idle":"2022-07-19T17:35:58.306519Z","shell.execute_reply.started":"2022-07-19T17:35:58.280880Z","shell.execute_reply":"2022-07-19T17:35:58.305456Z"},"trusted":true},"execution_count":null,"outputs":[]}]}