{ "cells": [ { "attachments": {}, "cell_type": "markdown", "id": "fd7e6164", "metadata": {}, "source": [ "# Using GPT-4o mini to tag & caption images\n", "\n", "This notebook explores how to leverage the vision capabilities of the GPT-4* models (for example `gpt-4o`, `gpt-4o-mini` or `gpt-4-turbo`) to tag & caption images. \n", "\n", "We can leverage the multimodal capabilities of these models to provide input images along with additional context on what they represent, and prompt the model to output tags or image descriptions. The image descriptions can then be further refined with a language model (in this notebook, we'll use `gpt-4o-mini`) to generate captions. \n", "\n", "Generating text content from images can be useful for multiple use cases, especially use cases involving search. \n", "We will illustrate a search use case in this notebook by using generated keywords and product captions to search for products - both from a text input and an image input.\n", "\n", "As an example, we will use a dataset of Amazon furniture items, tag them with relevant keywords and generate short, descriptive captions." ] }, { "cell_type": "markdown", "id": "a00b5267", "metadata": {}, "source": [ "## Setup" ] }, { "cell_type": "code", "execution_count": null, "id": "176a7836", "metadata": {}, "outputs": [], "source": [ "# Install dependencies if needed\n", "%pip install openai\n", "%pip install scikit-learn" ] }, { "cell_type": "code", "execution_count": 1, "id": "5b4c63de", "metadata": {}, "outputs": [], "source": [ "from IPython.display import Image, display\n", "import pandas as pd\n", "from sklearn.metrics.pairwise import cosine_similarity\n", "import numpy as np\n", "from openai import OpenAI\n", "\n", "# Initializing OpenAI client - see https://platform.openai.com/docs/quickstart?context=python\n", "client = OpenAI()" ] }, { "cell_type": "code", "execution_count": 2, "id": "1b0fa62d", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
asinurltitlebrandpriceavailabilitycategoriesprimary_imageimagesupc...colormaterialstyleimportant_informationproduct_overviewabout_itemdescriptionspecificationsuniq_idscraped_at
0B0CJHKVG6Phttps://www.amazon.com/dp/B0CJHKVG6PGOYMFK 1pc Free Standing Shoe Rack, Multi-laye...GOYMFK$24.99Only 13 left in stock - order soon.['Home & Kitchen', 'Storage & Organization', '...https://m.media-amazon.com/images/I/416WaLx10j...['https://m.media-amazon.com/images/I/416WaLx1...NaN...WhiteMetalModern[][{'Brand': ' GOYMFK '}, {'Color': ' White '}, ...['Multiple layers: Provides ample storage spac...multiple shoes, coats, hats, and other items E...['Brand: GOYMFK', 'Color: White', 'Material: M...02593e81-5c09-5069-8516-b0b29f439ded2024-02-02 15:15:08
1B0B66QHB23https://www.amazon.com/dp/B0B66QHB23subrtex Leather ding Room, Dining Chairs Set o...subrtexNaNNaN['Home & Kitchen', 'Furniture', 'Dining Room F...https://m.media-amazon.com/images/I/31SejUEWY7...['https://m.media-amazon.com/images/I/31SejUEW...NaN...BlackSpongeBlack Rubber Wood[]NaN['【Easy Assembly】: Set of 2 dining room chairs...subrtex Dining chairs Set of 2['Brand: subrtex', 'Color: Black', 'Product Di...5938d217-b8c5-5d3e-b1cf-e28e340f292e2024-02-02 15:15:09
2B0BXRTWLYKhttps://www.amazon.com/dp/B0BXRTWLYKPlant Repotting Mat MUYETOL Waterproof Transpl...MUYETOL$5.98In Stock['Patio, Lawn & Garden', 'Outdoor Décor', 'Doo...https://m.media-amazon.com/images/I/41RgefVq70...['https://m.media-amazon.com/images/I/41RgefVq...NaN...GreenPolyethyleneModern[][{'Brand': ' MUYETOL '}, {'Size': ' 26.8*26.8 ...['PLANT REPOTTING MAT SIZE: 26.8\" x 26.8\", squ...NaN['Brand: MUYETOL', 'Size: 26.8*26.8', 'Item We...b2ede786-3f51-5a45-9a5b-bcf856958cd82024-02-02 15:15:09
3B0C1MRB2M8https://www.amazon.com/dp/B0C1MRB2M8Pickleball Doormat, Welcome Doormat Absorbent ...VEWETOL$13.99Only 10 left in stock - order soon.['Patio, Lawn & Garden', 'Outdoor Décor', 'Doo...https://m.media-amazon.com/images/I/61vz1Igler...['https://m.media-amazon.com/images/I/61vz1Igl...NaN...A5589RubberModern[][{'Brand': ' VEWETOL '}, {'Size': ' 16*24INCH ...['Specifications: 16x24 Inch ', \" High-Quality...The decorative doormat features a subtle textu...['Brand: VEWETOL', 'Size: 16*24INCH', 'Materia...8fd9377b-cfa6-5f10-835c-6b8eca2816b52024-02-02 15:15:10
4B0CG1N9QRChttps://www.amazon.com/dp/B0CG1N9QRCJOIN IRON Foldable TV Trays for Eating Set of ...JOIN IRON Store$89.99Usually ships within 5 to 6 weeks['Home & Kitchen', 'Furniture', 'Game & Recrea...https://m.media-amazon.com/images/I/41p4d4VJnN...['https://m.media-amazon.com/images/I/41p4d4VJ...NaN...Grey Set of 4IronX Classic Style[]NaN['Includes 4 Folding Tv Tray Tables And one Co...Set of Four Folding Trays With Matching Storag...['Brand: JOIN IRON', 'Shape: Rectangular', 'In...bdc9aa30-9439-50dc-8e89-213ea211d66a2024-02-02 15:15:11
\n", "

5 rows × 25 columns

\n", "
" ], "text/plain": [ " asin url \\\n", "0 B0CJHKVG6P https://www.amazon.com/dp/B0CJHKVG6P \n", "1 B0B66QHB23 https://www.amazon.com/dp/B0B66QHB23 \n", "2 B0BXRTWLYK https://www.amazon.com/dp/B0BXRTWLYK \n", "3 B0C1MRB2M8 https://www.amazon.com/dp/B0C1MRB2M8 \n", "4 B0CG1N9QRC https://www.amazon.com/dp/B0CG1N9QRC \n", "\n", " title brand price \\\n", "0 GOYMFK 1pc Free Standing Shoe Rack, Multi-laye... GOYMFK $24.99 \n", "1 subrtex Leather ding Room, Dining Chairs Set o... subrtex NaN \n", "2 Plant Repotting Mat MUYETOL Waterproof Transpl... MUYETOL $5.98 \n", "3 Pickleball Doormat, Welcome Doormat Absorbent ... VEWETOL $13.99 \n", "4 JOIN IRON Foldable TV Trays for Eating Set of ... JOIN IRON Store $89.99 \n", "\n", " availability \\\n", "0 Only 13 left in stock - order soon. \n", "1 NaN \n", "2 In Stock \n", "3 Only 10 left in stock - order soon. \n", "4 Usually ships within 5 to 6 weeks \n", "\n", " categories \\\n", "0 ['Home & Kitchen', 'Storage & Organization', '... \n", "1 ['Home & Kitchen', 'Furniture', 'Dining Room F... \n", "2 ['Patio, Lawn & Garden', 'Outdoor Décor', 'Doo... \n", "3 ['Patio, Lawn & Garden', 'Outdoor Décor', 'Doo... \n", "4 ['Home & Kitchen', 'Furniture', 'Game & Recrea... \n", "\n", " primary_image \\\n", "0 https://m.media-amazon.com/images/I/416WaLx10j... \n", "1 https://m.media-amazon.com/images/I/31SejUEWY7... \n", "2 https://m.media-amazon.com/images/I/41RgefVq70... \n", "3 https://m.media-amazon.com/images/I/61vz1Igler... \n", "4 https://m.media-amazon.com/images/I/41p4d4VJnN... \n", "\n", " images upc ... color \\\n", "0 ['https://m.media-amazon.com/images/I/416WaLx1... NaN ... White \n", "1 ['https://m.media-amazon.com/images/I/31SejUEW... NaN ... Black \n", "2 ['https://m.media-amazon.com/images/I/41RgefVq... NaN ... Green \n", "3 ['https://m.media-amazon.com/images/I/61vz1Igl... NaN ... A5589 \n", "4 ['https://m.media-amazon.com/images/I/41p4d4VJ... NaN ... Grey Set of 4 \n", "\n", " material style important_information \\\n", "0 Metal Modern [] \n", "1 Sponge Black Rubber Wood [] \n", "2 Polyethylene Modern [] \n", "3 Rubber Modern [] \n", "4 Iron X Classic Style [] \n", "\n", " product_overview \\\n", "0 [{'Brand': ' GOYMFK '}, {'Color': ' White '}, ... \n", "1 NaN \n", "2 [{'Brand': ' MUYETOL '}, {'Size': ' 26.8*26.8 ... \n", "3 [{'Brand': ' VEWETOL '}, {'Size': ' 16*24INCH ... \n", "4 NaN \n", "\n", " about_item \\\n", "0 ['Multiple layers: Provides ample storage spac... \n", "1 ['【Easy Assembly】: Set of 2 dining room chairs... \n", "2 ['PLANT REPOTTING MAT SIZE: 26.8\" x 26.8\", squ... \n", "3 ['Specifications: 16x24 Inch ', \" High-Quality... \n", "4 ['Includes 4 Folding Tv Tray Tables And one Co... \n", "\n", " description \\\n", "0 multiple shoes, coats, hats, and other items E... \n", "1 subrtex Dining chairs Set of 2 \n", "2 NaN \n", "3 The decorative doormat features a subtle textu... \n", "4 Set of Four Folding Trays With Matching Storag... \n", "\n", " specifications \\\n", "0 ['Brand: GOYMFK', 'Color: White', 'Material: M... \n", "1 ['Brand: subrtex', 'Color: Black', 'Product Di... \n", "2 ['Brand: MUYETOL', 'Size: 26.8*26.8', 'Item We... \n", "3 ['Brand: VEWETOL', 'Size: 16*24INCH', 'Materia... \n", "4 ['Brand: JOIN IRON', 'Shape: Rectangular', 'In... \n", "\n", " uniq_id scraped_at \n", "0 02593e81-5c09-5069-8516-b0b29f439ded 2024-02-02 15:15:08 \n", "1 5938d217-b8c5-5d3e-b1cf-e28e340f292e 2024-02-02 15:15:09 \n", "2 b2ede786-3f51-5a45-9a5b-bcf856958cd8 2024-02-02 15:15:09 \n", "3 8fd9377b-cfa6-5f10-835c-6b8eca2816b5 2024-02-02 15:15:10 \n", "4 bdc9aa30-9439-50dc-8e89-213ea211d66a 2024-02-02 15:15:11 \n", "\n", "[5 rows x 25 columns]" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Loading dataset\n", "dataset_path = \"data/amazon_furniture_dataset.csv\"\n", "df = pd.read_csv(dataset_path)\n", "df.head()" ] }, { "cell_type": "markdown", "id": "f4d862fa", "metadata": {}, "source": [ "## Tag images\n", "\n", "In this section, we'll use GPT-4o mini to generate relevant tags for our products.\n", "\n", "We'll use a simple zero-shot approach to extract keywords, and deduplicate those keywords using embeddings to avoid having multiple keywords that are too similar.\n", "\n", "We will use a combination of an image and the product title to avoid extracting keywords for other items that are depicted in the image - sometimes there are multiple items used in the scene and we want to focus on just the one we want to tag." ] }, { "cell_type": "markdown", "id": "20d7a5c8", "metadata": {}, "source": [ "### Extract keywords" ] }, { "cell_type": "code", "execution_count": 32, "id": "752118c4", "metadata": {}, "outputs": [], "source": [ "system_prompt = '''\n", " You are an agent specialized in tagging images of furniture items, decorative items, or furnishings with relevant keywords that could be used to search for these items on a marketplace.\n", " \n", " You will be provided with an image and the title of the item that is depicted in the image, and your goal is to extract keywords for only the item specified. \n", " \n", " Keywords should be concise and in lower case. \n", " \n", " Keywords can describe things like:\n", " - Item type e.g. 'sofa bed', 'chair', 'desk', 'plant'\n", " - Item material e.g. 'wood', 'metal', 'fabric'\n", " - Item style e.g. 'scandinavian', 'vintage', 'industrial'\n", " - Item color e.g. 'red', 'blue', 'white'\n", " \n", " Only deduce material, style or color keywords when it is obvious that they make the item depicted in the image stand out.\n", "\n", " Return keywords in the format of an array of strings, like this:\n", " ['desk', 'industrial', 'metal']\n", " \n", "'''\n", "\n", "def analyze_image(img_url, title):\n", " response = client.chat.completions.create(\n", " model=\"gpt-4o-mini\",\n", " messages=[\n", " {\n", " \"role\": \"system\",\n", " \"content\": system_prompt\n", " },\n", " {\n", " \"role\": \"user\",\n", " \"content\": [\n", " {\n", " \"type\": \"image_url\",\n", " \"image_url\": {\n", " \"url\": img_url,\n", " }\n", " },\n", " ],\n", " },\n", " {\n", " \"role\": \"user\",\n", " \"content\": title\n", " }\n", " ],\n", " max_tokens=300,\n", " top_p=0.1\n", " )\n", "\n", " return response.choices[0].message.content" ] }, { "cell_type": "markdown", "id": "cf75e59c", "metadata": {}, "source": [ "#### Testing with a few examples" ] }, { "cell_type": "code", "execution_count": 33, "id": "eb6a8159", "metadata": {}, "outputs": [], "source": [ "examples = df.iloc[:5]" ] }, { "cell_type": "code", "execution_count": 34, "id": "b729129b", "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "['shoe rack', 'metal', 'white', 'multi-layer', 'hooks']\n", "\n", "\n", "\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "['dining chair', 'leather', 'black']\n", "\n", "\n", "\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "['repotting mat', 'waterproof', 'portable', 'foldable', 'green']\n", "\n", "\n", "\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "['doormat', 'absorbent', 'non-slip', 'coconut fiber', 'welcome', 'pickleball', 'outdoor']\n", "\n", "\n", "\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "['tv tray', 'foldable', 'metal', 'grey']\n", "\n", "\n", "\n" ] } ], "source": [ "for index, ex in examples.iterrows():\n", " url = ex['primary_image']\n", " img = Image(url=url)\n", " display(img)\n", " result = analyze_image(url, ex['title'])\n", " print(result)\n", " print(\"\\n\\n\")" ] }, { "cell_type": "markdown", "id": "00b727b5", "metadata": {}, "source": [ "### Looking up existing keywords\n", "\n", "Using embeddings to avoid duplicates (synonyms) and/or match pre-defined keywords" ] }, { "cell_type": "code", "execution_count": 35, "id": "f73d1b59", "metadata": {}, "outputs": [], "source": [ "# Feel free to change the embedding model here\n", "def get_embedding(value, model=\"text-embedding-3-large\"): \n", " embeddings = client.embeddings.create(\n", " model=model,\n", " input=value,\n", " encoding_format=\"float\"\n", " )\n", " return embeddings.data[0].embedding" ] }, { "cell_type": "markdown", "id": "651c99ce", "metadata": {}, "source": [ "#### Testing with example keywords" ] }, { "cell_type": "code", "execution_count": 36, "id": "f0262f03", "metadata": {}, "outputs": [], "source": [ "# Existing keywords\n", "keywords_list = ['industrial', 'metal', 'wood', 'vintage', 'bed']" ] }, { "cell_type": "code", "execution_count": 37, "id": "afc489d4", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
keywordembedding
0industrial[-0.026137426, 0.021297162, -0.007273361, -0.0...
1metal[-0.020492474, 0.0044436487, -0.0110632675, -0...
2wood[0.013840097, 0.029538965, 0.00064718135, -0.0...
3vintage[-0.052348174, 0.008181616, -0.015513194, 0.00...
4bed[-0.011677503, 0.023275835, 0.0026937425, -0.0...
\n", "
" ], "text/plain": [ " keyword embedding\n", "0 industrial [-0.026137426, 0.021297162, -0.007273361, -0.0...\n", "1 metal [-0.020492474, 0.0044436487, -0.0110632675, -0...\n", "2 wood [0.013840097, 0.029538965, 0.00064718135, -0.0...\n", "3 vintage [-0.052348174, 0.008181616, -0.015513194, 0.00...\n", "4 bed [-0.011677503, 0.023275835, 0.0026937425, -0.0..." ] }, "execution_count": 37, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_keywords = pd.DataFrame(keywords_list, columns=['keyword'])\n", "df_keywords['embedding'] = df_keywords['keyword'].apply(lambda x: get_embedding(x))\n", "df_keywords" ] }, { "cell_type": "code", "execution_count": 38, "id": "f549e537", "metadata": {}, "outputs": [], "source": [ "def compare_keyword(keyword):\n", " embedded_value = get_embedding(keyword)\n", " df_keywords['similarity'] = df_keywords['embedding'].apply(lambda x: cosine_similarity(np.array(x).reshape(1,-1), np.array(embedded_value).reshape(1, -1)))\n", " most_similar = df_keywords.sort_values('similarity', ascending=False).iloc[0]\n", " return most_similar\n", "\n", "def replace_keyword(keyword, threshold = 0.6):\n", " most_similar = compare_keyword(keyword)\n", " if most_similar['similarity'] > threshold:\n", " print(f\"Replacing '{keyword}' with existing keyword: '{most_similar['keyword']}'\")\n", " return most_similar['keyword']\n", " return keyword" ] }, { "cell_type": "code", "execution_count": 39, "id": "08c0ec9c", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Replacing 'bed frame' with existing keyword: 'bed'\n", "Replacing 'wooden' with existing keyword: 'wood'\n", "Replacing 'vintage' with existing keyword: 'vintage'\n", "Replacing 'metal' with existing keyword: 'metal'\n", "Replacing 'metallic' with existing keyword: 'metal'\n", "Replacing 'woody' with existing keyword: 'wood'\n", "Final keywords: {'vintage', 'desk', 'wood', 'table', 'old', 'bed', 'metal', 'old school'}\n" ] } ], "source": [ "# Example keywords to compare to our list of existing keywords\n", "example_keywords = ['bed frame', 'wooden', 'vintage', 'old school', 'desk', 'table', 'old', 'metal', 'metallic', 'woody']\n", "final_keywords = []\n", "\n", "for k in example_keywords:\n", " final_keywords.append(replace_keyword(k))\n", " \n", "final_keywords = set(final_keywords)\n", "print(f\"Final keywords: {final_keywords}\")" ] }, { "cell_type": "markdown", "id": "11b0afa1", "metadata": {}, "source": [ "## Generate captions\n", "\n", "In this section, we'll use GPT-4o mini to generate an image description and then use a few-shot examples approach with GPT-4-turbo to generate captions from the images.\n", "\n", "If few-shot examples are not enough for your use case, consider fine-tuning a model to get the generated captions to match the style & tone you are targeting. " ] }, { "cell_type": "code", "execution_count": 40, "id": "c67a434b", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
titleprimary_imagestylematerialcolorurl
0GOYMFK 1pc Free Standing Shoe Rack, Multi-laye...https://m.media-amazon.com/images/I/416WaLx10j...ModernMetalWhitehttps://www.amazon.com/dp/B0CJHKVG6P
1subrtex Leather ding Room, Dining Chairs Set o...https://m.media-amazon.com/images/I/31SejUEWY7...Black Rubber WoodSpongeBlackhttps://www.amazon.com/dp/B0B66QHB23
2Plant Repotting Mat MUYETOL Waterproof Transpl...https://m.media-amazon.com/images/I/41RgefVq70...ModernPolyethyleneGreenhttps://www.amazon.com/dp/B0BXRTWLYK
3Pickleball Doormat, Welcome Doormat Absorbent ...https://m.media-amazon.com/images/I/61vz1Igler...ModernRubberA5589https://www.amazon.com/dp/B0C1MRB2M8
4JOIN IRON Foldable TV Trays for Eating Set of ...https://m.media-amazon.com/images/I/41p4d4VJnN...X Classic StyleIronGrey Set of 4https://www.amazon.com/dp/B0CG1N9QRC
\n", "
" ], "text/plain": [ " title \\\n", "0 GOYMFK 1pc Free Standing Shoe Rack, Multi-laye... \n", "1 subrtex Leather ding Room, Dining Chairs Set o... \n", "2 Plant Repotting Mat MUYETOL Waterproof Transpl... \n", "3 Pickleball Doormat, Welcome Doormat Absorbent ... \n", "4 JOIN IRON Foldable TV Trays for Eating Set of ... \n", "\n", " primary_image style \\\n", "0 https://m.media-amazon.com/images/I/416WaLx10j... Modern \n", "1 https://m.media-amazon.com/images/I/31SejUEWY7... Black Rubber Wood \n", "2 https://m.media-amazon.com/images/I/41RgefVq70... Modern \n", "3 https://m.media-amazon.com/images/I/61vz1Igler... Modern \n", "4 https://m.media-amazon.com/images/I/41p4d4VJnN... X Classic Style \n", "\n", " material color url \n", "0 Metal White https://www.amazon.com/dp/B0CJHKVG6P \n", "1 Sponge Black https://www.amazon.com/dp/B0B66QHB23 \n", "2 Polyethylene Green https://www.amazon.com/dp/B0BXRTWLYK \n", "3 Rubber A5589 https://www.amazon.com/dp/B0C1MRB2M8 \n", "4 Iron Grey Set of 4 https://www.amazon.com/dp/B0CG1N9QRC " ] }, "execution_count": 40, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Cleaning up dataset columns\n", "selected_columns = ['title', 'primary_image', 'style', 'material', 'color', 'url']\n", "df = df[selected_columns].copy()\n", "df.head()" ] }, { "cell_type": "markdown", "id": "9bb5c4fa", "metadata": {}, "source": [ "### Describing images with GPT-4o mini" ] }, { "cell_type": "code", "execution_count": 41, "id": "561912fc", "metadata": {}, "outputs": [], "source": [ "describe_system_prompt = '''\n", " You are a system generating descriptions for furniture items, decorative items, or furnishings on an e-commerce website.\n", " Provided with an image and a title, you will describe the main item that you see in the image, giving details but staying concise.\n", " You can describe unambiguously what the item is and its material, color, and style if clearly identifiable.\n", " If there are multiple items depicted, refer to the title to understand which item you should describe.\n", " '''\n", "\n", "def describe_image(img_url, title):\n", " response = client.chat.completions.create(\n", " model=\"gpt-4o-mini\",\n", " temperature=0.2,\n", " messages=[\n", " {\n", " \"role\": \"system\",\n", " \"content\": describe_system_prompt\n", " },\n", " {\n", " \"role\": \"user\",\n", " \"content\": [\n", " {\n", " \"type\": \"image_url\",\n", " \"image_url\": {\n", " \"url\": img_url,\n", " }\n", " },\n", " ],\n", " },\n", " {\n", " \"role\": \"user\",\n", " \"content\": title\n", " }\n", " ],\n", " max_tokens=300,\n", " )\n", "\n", " return response.choices[0].message.content" ] }, { "cell_type": "markdown", "id": "f46f6486", "metadata": {}, "source": [ "#### Testing on a few examples" ] }, { "cell_type": "code", "execution_count": 42, "id": "a0351489", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "GOYMFK 1pc Free Standing Shoe Rack, Multi-layer Me... - https://www.amazon.com/dp/B0CJHKVG6P :\n", "\n", "The item is a free-standing shoe rack designed for versatile use in living rooms, bathrooms, or hallways. It features a multi-layer metal structure with a sleek white finish. The rack includes eight double hooks at the top for hanging accessories like hats, bags, or scarves. Below, there are multiple shelves that provide ample space for organizing shoes, making it both functional and stylish for entryway storage.\n", "--------------------------\n", "\n", "subrtex Leather ding Room, Dining Chairs Set of 2,... - https://www.amazon.com/dp/B0B66QHB23 :\n", "\n", "The Subrtex Leather Dining Chairs come in a set of two, featuring a sleek black design. Each chair is upholstered in durable faux leather, offering a modern and stylish look. The high backrest is accentuated with subtle vertical stitching, while the sturdy wooden legs provide stability and support. These chairs are ideal for enhancing the aesthetic of any dining room.\n", "--------------------------\n", "\n", "Plant Repotting Mat MUYETOL Waterproof Transplanti... - https://www.amazon.com/dp/B0BXRTWLYK :\n", "\n", "The Plant Repotting Mat is a portable and foldable gardening accessory, measuring 26.8\" x 26.8\". It features a vibrant green color with black edges, designed to be waterproof for easy cleanup during soil changes. The mat provides a spacious area for repotting plants and comes with tools for transplanting. Ideal for indoor gardening, it helps keep your workspace tidy while you care for your succulents and other plants.\n", "--------------------------\n", "\n", "Pickleball Doormat, Welcome Doormat Absorbent Non-... - https://www.amazon.com/dp/B0C1MRB2M8 :\n", "\n", "The Pickleball Doormat features a natural coir material with a rectangular shape, measuring 16x24 inches. It showcases a playful design with the phrase \"It's a good day to play PICKLEBALL\" in bold black lettering, accompanied by graphic illustrations of pickleball paddles. The mat is designed to be absorbent and non-slip, making it suitable for entryways or bathrooms. Its light brown color adds a warm touch to any space.\n", "--------------------------\n", "\n", "JOIN IRON Foldable TV Trays for Eating Set of 4 wi... - https://www.amazon.com/dp/B0CG1N9QRC :\n", "\n", "The JOIN IRON Foldable TV Trays set includes four sleek, grey snack tables designed for convenience and space-saving. Each tray features a sturdy, flat surface supported by a durable metal frame, allowing for easy folding and storage. The minimalist design makes them ideal for small spaces, perfect for enjoying meals or snacks while watching TV. The set also comes with a stand for organized storage when not in use.\n", "--------------------------\n", "\n" ] } ], "source": [ "for index, row in examples.iterrows():\n", " print(f\"{row['title'][:50]}{'...' if len(row['title']) > 50 else ''} - {row['url']} :\\n\")\n", " img_description = describe_image(row['primary_image'], row['title'])\n", " print(f\"{img_description}\\n--------------------------\\n\")" ] }, { "cell_type": "markdown", "id": "d63f628f", "metadata": {}, "source": [ "### Turning descriptions into captions\n", "Using a few-shot examples approach to turn a long description into a short image caption" ] }, { "cell_type": "code", "execution_count": 43, "id": "66b5bc53", "metadata": {}, "outputs": [], "source": [ "caption_system_prompt = '''\n", "Your goal is to generate short, descriptive captions for images of furniture items, decorative items, or furnishings based on an image description.\n", "You will be provided with a description of an item image and you will output a caption that captures the most important information about the item.\n", "Your generated caption should be short (1 sentence), and include the most relevant information about the item.\n", "The most important information could be: the type of the item, the style (if mentioned), the material if especially relevant and any distinctive features.\n", "'''\n", "\n", "few_shot_examples = [\n", " {\n", " \"description\": \"This is a multi-layer metal shoe rack featuring a free-standing design. It has a clean, white finish that gives it a modern and versatile look, suitable for various home decors. The rack includes several horizontal shelves dedicated to organizing shoes, providing ample space for multiple pairs. Above the shoe storage area, there are 8 double hooks arranged in two rows, offering additional functionality for hanging items such as hats, scarves, or bags. The overall structure is sleek and space-saving, making it an ideal choice for placement in living rooms, bathrooms, hallways, or entryways where efficient use of space is essential.\",\n", " \"caption\": \"White metal free-standing shoe rack\"\n", " },\n", " {\n", " \"description\": \"The image shows a set of two dining chairs in black. These chairs are upholstered in a leather-like material, giving them a sleek and sophisticated appearance. The design features straight lines with a slight curve at the top of the high backrest, which adds a touch of elegance. The chairs have a simple, vertical stitching detail on the backrest, providing a subtle decorative element. The legs are also black, creating a uniform look that would complement a contemporary dining room setting. The chairs appear to be designed for comfort and style, suitable for both casual and formal dining environments.\",\n", " \"caption\": \"Set of 2 modern black leather dining chairs\"\n", " },\n", " {\n", " \"description\": \"This is a square plant repotting mat designed for indoor gardening tasks such as transplanting and changing soil for plants. It measures 26.8 inches by 26.8 inches and is made from a waterproof material, which appears to be a durable, easy-to-clean fabric in a vibrant green color. The edges of the mat are raised with integrated corner loops, likely to keep soil and water contained during gardening activities. The mat is foldable, enhancing its portability, and can be used as a protective surface for various gardening projects, including working with succulents. It's a practical accessory for garden enthusiasts and makes for a thoughtful gift for those who enjoy indoor plant care.\",\n", " \"caption\": \"Waterproof square plant repotting mat\"\n", " }\n", "]\n", "\n", "formatted_examples = [[{\n", " \"role\": \"user\",\n", " \"content\": ex['description']\n", "},\n", "{\n", " \"role\": \"assistant\", \n", " \"content\": ex['caption']\n", "}]\n", " for ex in few_shot_examples\n", "]\n", "\n", "formatted_examples = [i for ex in formatted_examples for i in ex]" ] }, { "cell_type": "code", "execution_count": 44, "id": "b5ac5262", "metadata": {}, "outputs": [], "source": [ "def caption_image(description, model=\"gpt-4o-mini\"):\n", " messages = formatted_examples\n", " messages.insert(0, \n", " {\n", " \"role\": \"system\",\n", " \"content\": caption_system_prompt\n", " })\n", " messages.append(\n", " {\n", " \"role\": \"user\",\n", " \"content\": description\n", " })\n", " response = client.chat.completions.create(\n", " model=model,\n", " temperature=0.2,\n", " messages=messages\n", " )\n", "\n", " return response.choices[0].message.content" ] }, { "cell_type": "markdown", "id": "f5661152", "metadata": {}, "source": [ "#### Testing on a few examples" ] }, { "cell_type": "code", "execution_count": 45, "id": "2d8f3427", "metadata": {}, "outputs": [], "source": [ "examples = df.iloc[5:8]" ] }, { "cell_type": "code", "execution_count": 46, "id": "b426d22d", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "LOVMOR 30'' Bathroom Vanity Sink Base Cabine, Stor... - https://www.amazon.com/dp/B0C9WYYFLB :\n", "\n", "The LOVMOR 30'' Bathroom Vanity Sink Base Cabinet features a classic design with a rich brown finish. It includes three drawers on the left side for ample storage, complemented by a spacious cabinet door on the right. The cabinet is constructed with detailed paneling, adding a touch of elegance, making it suitable for bathrooms, kitchens, laundry rooms, and more. Its versatile style allows it to blend seamlessly into various decor themes.\n", "--------------------------\n", "\n", "Classic 30'' brown bathroom vanity sink base cabinet with storage drawers.\n", "--------------------------\n", "\n", "Folews Bathroom Organizer Over The Toilet Storage,... - https://www.amazon.com/dp/B09NZY3R1T :\n", "\n", "The Folews Bathroom Organizer is a freestanding, 4-tier storage rack designed to fit over a toilet. It features a sleek black metal frame with adjustable shelves, allowing for customizable storage options. The shelves are made of wire, providing a modern look while ensuring durability. This organizer includes baskets for additional storage and is ideal for maximizing bathroom space by holding toiletries, towels, and other essentials. Its design is both functional and stylish, making it a great addition to any bathroom.\n", "--------------------------\n", "\n", "Freestanding 4-tier black metal bathroom organizer with adjustable wire shelves and baskets.\n", "--------------------------\n", "\n", "GOYMFK 1pc Free Standing Shoe Rack, Multi-layer Me... - https://www.amazon.com/dp/B0CJHKVG6P :\n", "\n", "The GOYMFK Free Standing Shoe Rack is a versatile storage solution designed for various spaces like living rooms, bathrooms, or hallways. It features a multi-layer metal construction with a sleek white finish. The rack includes eight double hooks at the top for hanging items such as hats, bags, or scarves. Below, there are multiple shelves for organizing shoes, accommodating various styles and sizes. Its modern design combines functionality with a clean aesthetic, making it a practical addition to any home.\n", "--------------------------\n", "\n", "Versatile white metal free-standing shoe rack with hooks and multiple shelves.\n", "--------------------------\n", "\n" ] } ], "source": [ "for index, row in examples.iterrows():\n", " print(f\"{row['title'][:50]}{'...' if len(row['title']) > 50 else ''} - {row['url']} :\\n\")\n", " img_description = describe_image(row['primary_image'], row['title'])\n", " print(f\"{img_description}\\n--------------------------\\n\")\n", " img_caption = caption_image(img_description)\n", " print(f\"{img_caption}\\n--------------------------\\n\")" ] }, { "cell_type": "markdown", "id": "b4b5e705", "metadata": {}, "source": [ "## Image search\n", "\n", "In this section, we will use generated keywords and captions to search items that match a given input, either text or image.\n", "\n", "We will leverage our embeddings model to generate embeddings for the keywords and captions and compare them to either input text or the generated caption from an input image." ] }, { "cell_type": "code", "execution_count": 47, "id": "302d251d", "metadata": {}, "outputs": [], "source": [ "# Df we'll use to compare keywords\n", "df_keywords = pd.DataFrame(columns=['keyword', 'embedding'])\n", "df['keywords'] = ''\n", "df['img_description'] = ''\n", "df['caption'] = ''" ] }, { "cell_type": "code", "execution_count": 48, "id": "9285bb14", "metadata": {}, "outputs": [], "source": [ "# Function to replace a keyword with an existing keyword if it's too similar\n", "def get_keyword(keyword, df_keywords, threshold = 0.6):\n", " embedded_value = get_embedding(keyword)\n", " df_keywords['similarity'] = df_keywords['embedding'].apply(lambda x: cosine_similarity(np.array(x).reshape(1,-1), np.array(embedded_value).reshape(1, -1)))\n", " sorted_keywords = df_keywords.copy().sort_values('similarity', ascending=False)\n", " if len(sorted_keywords) > 0 :\n", " most_similar = sorted_keywords.iloc[0]\n", " if most_similar['similarity'] > threshold:\n", " print(f\"Replacing '{keyword}' with existing keyword: '{most_similar['keyword']}'\")\n", " return most_similar['keyword']\n", " new_keyword = {\n", " 'keyword': keyword,\n", " 'embedding': embedded_value\n", " }\n", " df_keywords = pd.concat([df_keywords, pd.DataFrame([new_keyword])], ignore_index=True)\n", " return keyword" ] }, { "cell_type": "markdown", "id": "0a4051ae", "metadata": {}, "source": [ "### Preparing the dataset" ] }, { "cell_type": "code", "execution_count": 49, "id": "297bbc45", "metadata": {}, "outputs": [], "source": [ "import ast\n", "\n", "def tag_and_caption(row):\n", " keywords = analyze_image(row['primary_image'], row['title'])\n", " try:\n", " keywords = ast.literal_eval(keywords)\n", " mapped_keywords = [get_keyword(k, df_keywords) for k in keywords]\n", " except Exception as e:\n", " print(f\"Error parsing keywords: {keywords}\")\n", " mapped_keywords = []\n", " img_description = describe_image(row['primary_image'], row['title'])\n", " caption = caption_image(img_description)\n", " return {\n", " 'keywords': mapped_keywords,\n", " 'img_description': img_description,\n", " 'caption': caption\n", " }\n" ] }, { "cell_type": "code", "execution_count": 50, "id": "e62b8708", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(312, 9)" ] }, "execution_count": 50, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.shape" ] }, { "cell_type": "markdown", "id": "d59b4b98", "metadata": {}, "source": [ "Processing all 312 lines of the dataset will take a while.\n", "To test out the idea, we will only run it on the first 50 lines: this takes ~20 mins. \n", "Feel free to skip this step and load the already processed dataset (see below)." ] }, { "cell_type": "code", "execution_count": 51, "id": "43ec629b", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0 - GOYMFK 1pc Free Standing Shoe Rack, Multi-layer Me...\n", "1 - subrtex Leather ding Room, Dining Chairs Set of 2,...\n", "2 - Plant Repotting Mat MUYETOL Waterproof Transplanti...\n", "3 - Pickleball Doormat, Welcome Doormat Absorbent Non-...\n", "4 - JOIN IRON Foldable TV Trays for Eating Set of 4 wi...\n", "5 - LOVMOR 30'' Bathroom Vanity Sink Base Cabine, Stor...\n", "6 - Folews Bathroom Organizer Over The Toilet Storage,...\n", "7 - GOYMFK 1pc Free Standing Shoe Rack, Multi-layer Me...\n", "8 - subrtex Leather ding Room, Dining Chairs Set of 2,...\n", "9 - Plant Repotting Mat MUYETOL Waterproof Transplanti...\n", "10 - Pickleball Doormat, Welcome Doormat Absorbent Non-...\n", "11 - JOIN IRON Foldable TV Trays for Eating Set of 4 wi...\n", "12 - LOVMOR 30'' Bathroom Vanity Sink Base Cabine, Stor...\n", "13 - Folews Bathroom Organizer Over The Toilet Storage,...\n", "14 - Lerliuo Nightstand, Side Table, Industrial Bedside...\n", "15 - Boss Office Products Any Task Mid-Back Task Chair ...\n", "16 - Kingston Brass BA1752BB Heritage 18-Inch Towel-Bar...\n", "17 - Chief Mfg.Swing-Arm Wall Mount Hardware Mount Blac...\n", "18 - DOMYDEVM Black End Table, Nightstand with Charging...\n", "19 - LASCO 35-5019 Hallmack Style 24-Inch Towel Bar Acc...\n", "20 - Table-Mate II PRO TV Tray Table - Folding Table wi...\n", "21 - EGFheal White Dress Up Storage\n", "22 - Caroline's Treasures PPD3013JMAT Enchanted Garden ...\n", "23 - Leick Home 70007-WTGD Mixed Metal and Wood Stepped...\n", "24 - Caroline's Treasures CK3435MAT Bichon Frise Doorma...\n", "25 - Wildkin Kids Canvas Sling Bookshelf with Storage f...\n", "26 - Gbuzozie 38L Round Laundry Hamper Cute Mermaid Gir...\n", "27 - Tiita Comfy Saucer Chair, Soft Faux Fur Oversized ...\n", "28 - Summer Desk Decor,Welcome Summer Wood Block Sign D...\n", "29 - Homebeez 39.1\" Length Bedroom Storage Bench, End B...\n", "30 - Flash Furniture Webb Commercial Grade 24\" Round Bl...\n", "31 - Mellow 2 Inch Ventilated Memory Foam Mattress Topp...\n", "32 - CangLong Mid Century Modern Side Chair with Wood L...\n", "33 - HomePop Metal Accent Table Triangle Base Round Mir...\n", "34 - MAEPA RV Shoe Storage for Bedside - 8 Extra Large ...\n", "35 - NearMoon Hand Towel Holder/Towel Ring - Bathroom T...\n", "36 - FLYJOE Narrow Side Table with PU Leather Magazine ...\n", "37 - HomePop Home Decor | K2380-YDQY-2 | Luxury Large F...\n", "38 - Moroccan Leather Pouf Ottoman for Living Room - Ro...\n", "39 - AnyDesign Christmas Welcome Doormat Decorative Xma...\n", "40 - GXFC ZHAO Welcome Funny Door Mat Shoes and Bras Of...\n", "41 - LEASYLIFE Black Metal Trash can,10L/2.6GAL,Open To...\n", "42 - Solid Wood Wine Cabinet, bar Rack - Home Wood Furn...\n", "43 - Black Leather Office Chair Mid Back Leather Desk C...\n", "44 - Convenience Concepts Tucson Flip Top End Table wit...\n", "45 - 3-Tier Kitchen Storage Cart with Handle, Multifunc...\n", "46 - Mimoglad Office Chair, High Back Ergonomic Desk Ch...\n", "47 - Let the Adventure Begin Door Mat 17\"x30\" Decorativ...\n", "48 - 1 Pack Adjustable Height Center Support Leg for Be...\n", "49 - Stylo Culture Traditional Cotton Patchwork Embroid...\n" ] } ], "source": [ "# Running on first 50 lines\n", "for index, row in df[:50].iterrows():\n", " print(f\"{index} - {row['title'][:50]}{'...' if len(row['title']) > 50 else ''}\")\n", " updates = tag_and_caption(row)\n", " df.loc[index, updates.keys()] = updates.values()" ] }, { "cell_type": "code", "execution_count": 52, "id": "85febcd2", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
titleprimary_imagestylematerialcolorurlkeywordsimg_descriptioncaption
0GOYMFK 1pc Free Standing Shoe Rack, Multi-laye...https://m.media-amazon.com/images/I/416WaLx10j...ModernMetalWhitehttps://www.amazon.com/dp/B0CJHKVG6P[shoe rack, metal, white, multi-layer, hooks]The GOYMFK Free Standing Shoe Rack is a versat...Sleek white multi-layer metal free-standing sh...
1subrtex Leather ding Room, Dining Chairs Set o...https://m.media-amazon.com/images/I/31SejUEWY7...Black Rubber WoodSpongeBlackhttps://www.amazon.com/dp/B0B66QHB23[dining chair, leather, black]The Subrtex Leather Dining Chairs come in a se...Set of 2 modern black faux leather dining chai...
2Plant Repotting Mat MUYETOL Waterproof Transpl...https://m.media-amazon.com/images/I/41RgefVq70...ModernPolyethyleneGreenhttps://www.amazon.com/dp/B0BXRTWLYK[repotting mat, waterproof, portable, foldable...The Plant Repotting Mat is a portable and fold...Vibrant green waterproof plant repotting mat
3Pickleball Doormat, Welcome Doormat Absorbent ...https://m.media-amazon.com/images/I/61vz1Igler...ModernRubberA5589https://www.amazon.com/dp/B0C1MRB2M8[doormat, absorbent, non-slip, coconut fiber, ...The Pickleball Doormat is a charming welcome m...Coir welcome mat featuring a playful \"It's a g...
4JOIN IRON Foldable TV Trays for Eating Set of ...https://m.media-amazon.com/images/I/41p4d4VJnN...X Classic StyleIronGrey Set of 4https://www.amazon.com/dp/B0CG1N9QRC[tv tray, foldable, metal, grey]The JOIN IRON Foldable TV Tray Set includes fo...Set of 4 foldable grey TV trays with durable b...
\n", "
" ], "text/plain": [ " title \\\n", "0 GOYMFK 1pc Free Standing Shoe Rack, Multi-laye... \n", "1 subrtex Leather ding Room, Dining Chairs Set o... \n", "2 Plant Repotting Mat MUYETOL Waterproof Transpl... \n", "3 Pickleball Doormat, Welcome Doormat Absorbent ... \n", "4 JOIN IRON Foldable TV Trays for Eating Set of ... \n", "\n", " primary_image style \\\n", "0 https://m.media-amazon.com/images/I/416WaLx10j... Modern \n", "1 https://m.media-amazon.com/images/I/31SejUEWY7... Black Rubber Wood \n", "2 https://m.media-amazon.com/images/I/41RgefVq70... Modern \n", "3 https://m.media-amazon.com/images/I/61vz1Igler... Modern \n", "4 https://m.media-amazon.com/images/I/41p4d4VJnN... X Classic Style \n", "\n", " material color url \\\n", "0 Metal White https://www.amazon.com/dp/B0CJHKVG6P \n", "1 Sponge Black https://www.amazon.com/dp/B0B66QHB23 \n", "2 Polyethylene Green https://www.amazon.com/dp/B0BXRTWLYK \n", "3 Rubber A5589 https://www.amazon.com/dp/B0C1MRB2M8 \n", "4 Iron Grey Set of 4 https://www.amazon.com/dp/B0CG1N9QRC \n", "\n", " keywords \\\n", "0 [shoe rack, metal, white, multi-layer, hooks] \n", "1 [dining chair, leather, black] \n", "2 [repotting mat, waterproof, portable, foldable... \n", "3 [doormat, absorbent, non-slip, coconut fiber, ... \n", "4 [tv tray, foldable, metal, grey] \n", "\n", " img_description \\\n", "0 The GOYMFK Free Standing Shoe Rack is a versat... \n", "1 The Subrtex Leather Dining Chairs come in a se... \n", "2 The Plant Repotting Mat is a portable and fold... \n", "3 The Pickleball Doormat is a charming welcome m... \n", "4 The JOIN IRON Foldable TV Tray Set includes fo... \n", "\n", " caption \n", "0 Sleek white multi-layer metal free-standing sh... \n", "1 Set of 2 modern black faux leather dining chai... \n", "2 Vibrant green waterproof plant repotting mat \n", "3 Coir welcome mat featuring a playful \"It's a g... \n", "4 Set of 4 foldable grey TV trays with durable b... " ] }, "execution_count": 52, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.head()" ] }, { "cell_type": "code", "execution_count": 53, "id": "c36d3320", "metadata": {}, "outputs": [], "source": [ "data_path = \"data/items_tagged_and_captioned.csv\"" ] }, { "cell_type": "code", "execution_count": 54, "id": "b98b0ec8", "metadata": {}, "outputs": [], "source": [ "# Saving locally for later - optional: do not execute if you prefer to use the provided file\n", "df.to_csv(data_path, index=False)" ] }, { "cell_type": "code", "execution_count": 55, "id": "a9f0de2f", "metadata": {}, "outputs": [], "source": [ "# Optional: load data from saved file if you haven't processed the whole dataset\n", "df = pd.read_csv(data_path)" ] }, { "cell_type": "markdown", "id": "9336b03c", "metadata": {}, "source": [ "### Embedding captions and keywords\n", "We can now use the generated captions and keywords to match relevant content to an input text query or caption. \n", "To do this, we will embed a combination of keywords + captions.\n", "Note: creating the embeddings will take ~3 mins to run. Feel free to load the pre-processed dataset (see below)." ] }, { "cell_type": "code", "execution_count": 56, "id": "9cc54beb", "metadata": {}, "outputs": [], "source": [ "df_search = df.copy()" ] }, { "cell_type": "code", "execution_count": 57, "id": "d9810f84", "metadata": {}, "outputs": [], "source": [ "def embed_tags_caption(x):\n", " if x['caption'] != '':\n", " try:\n", " keywords_string = \",\".join(k for k in x['keywords']) + '\\n'\n", " content = keywords_string + x['caption']\n", " embedding = get_embedding(content)\n", " return embedding\n", " except Exception as e:\n", " print(f\"Error creating embedding for {x}: {e}\")" ] }, { "cell_type": "code", "execution_count": 58, "id": "6780488b", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Error creating embedding for title Suptsifira Shoe storage box, 24 Packs Shoe Box...\n", "primary_image https://m.media-amazon.com/images/I/51enKGSxK8...\n", "style NaN\n", "material Porcelain\n", "color White\n", "url https://www.amazon.com/dp/B0BZ85JVBN\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 50, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Wellynap Computer Desk,31.5 inches Folding Tab...\n", "primary_image https://m.media-amazon.com/images/I/51pO-N48te...\n", "style Modern\n", "material Wood\n", "color Teak & Black\n", "url https://www.amazon.com/dp/B0CFL2G31X\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 51, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Smlttel Gold Clothing Rack With Shelves, Gold ...\n", "primary_image https://m.media-amazon.com/images/I/41aRwocdfA...\n", "style Modern\n", "material Metal\n", "color C gold\n", "url https://www.amazon.com/dp/B0B93TC1Z8\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 52, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Franklin Sports NFL Storage Ottoman + Containe...\n", "primary_image https://m.media-amazon.com/images/I/31ptZB+wS-...\n", "style Team Licensed Storage Ottoman with Detachable Lid\n", "material Fabric\n", "color Team Color\n", "url https://www.amazon.com/dp/B0787KRJ8S\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 53, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Honey-Can-Do 3-Tier Nesting Bamboo Shoe Rack S...\n", "primary_image https://m.media-amazon.com/images/I/51GnnjKaVs...\n", "style Shoe\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B08WRLKR7T\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 54, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Furnistar 15.9 inch Modern Round Velvet Storag...\n", "primary_image https://m.media-amazon.com/images/I/31IBS5mzYS...\n", "style Modern\n", "material Wood\n", "color Grey\n", "url https://www.amazon.com/dp/B0C4NT8N8C\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 55, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title AMHANCIBLE C Shaped Side Table, End Tables Set...\n", "primary_image https://m.media-amazon.com/images/I/41qDAGoNCr...\n", "style Straight Leg\n", "material Engineered Wood\n", "color Black\n", "url https://www.amazon.com/dp/B0BT9SVN1V\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 56, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title LONGWIN Black Hanging Wall Round Mirror Decor ...\n", "primary_image https://m.media-amazon.com/images/I/41kC6cU5HX...\n", "style Modern\n", "material Glass, Metal\n", "color Black\n", "url https://www.amazon.com/dp/B094F897P3\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 57, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Need Fold Wall Mounted Workbench Folding Wall ...\n", "primary_image https://m.media-amazon.com/images/I/31SqvdFCut...\n", "style Modern\n", "material Metal\n", "color Teak Color Desktop & Warm White Folding Brackets\n", "url https://www.amazon.com/dp/B00UV7B29A\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 58, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Big Joe Fuf XL Cover Only Machine Washable, Gr...\n", "primary_image https://m.media-amazon.com/images/I/21ysztDdCY...\n", "style Plush\n", "material NaN\n", "color Grey\n", "url https://www.amazon.com/dp/B08T7JP8ZN\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 59, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Plymor Rectangle 5mm Beveled Glass Mirror, 6 i...\n", "primary_image https://m.media-amazon.com/images/I/31wigA5chu...\n", "style NaN\n", "material Glass\n", "color Silver\n", "url https://www.amazon.com/dp/B09F3SGZ8Y\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 60, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title TIMCORR CD Case DVD Holder Storage: 144 Capaci...\n", "primary_image https://m.media-amazon.com/images/I/411Q2ETwel...\n", "style Portable\n", "material EVA + PVC + PP + Non-woven fabric\n", "color Black\n", "url https://www.amazon.com/dp/B0B19ZGGXC\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 61, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Ginger Cayden Closed Towel Ring - 4905/SN - Sa...\n", "primary_image https://m.media-amazon.com/images/I/31LNv7QILd...\n", "style NaN\n", "material Brass\n", "color Satin Nickel\n", "url https://www.amazon.com/dp/B00U0ECLG2\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 62, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Brightify Black Bathroom Mirrors for Wall, 24 ...\n", "primary_image https://m.media-amazon.com/images/I/510A0nIdGZ...\n", "style Modern\n", "material Aluminum\n", "color Black\n", "url https://www.amazon.com/dp/B0C2HNGCRX\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 63, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title SogesHome Wood Corner Cabinet Wall Corner Stor...\n", "primary_image https://m.media-amazon.com/images/I/41BTUFVwm+...\n", "style Open Frame\n", "material NaN\n", "color White&teak\n", "url https://www.amazon.com/dp/B0C3B4D4RH\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 64, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Toy Storage for Lego Play Mat Bag - Duplo Toy ...\n", "primary_image https://m.media-amazon.com/images/I/51KKvmDCqB...\n", "style NaN\n", "material Nylon\n", "color Orange\n", "url https://www.amazon.com/dp/B0B4CL1M1M\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 65, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Flash Furniture Jefferson 2 Pk. Contemporary B...\n", "primary_image https://m.media-amazon.com/images/I/41GYYVLfGj...\n", "style Contemporary\n", "material NaN\n", "color Brown\n", "url https://www.amazon.com/dp/B00FEAN1SY\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 66, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Hong Art- Metal Mirror-Matt Black,Glass Panel ...\n", "primary_image https://m.media-amazon.com/images/I/31XytAHobH...\n", "style Classic\n", "material Metal\n", "color Black\n", "url https://www.amazon.com/dp/B08GSH4KVM\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 67, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Convenience Concepts American Heritage Round E...\n", "primary_image https://m.media-amazon.com/images/I/311rmB9BDW...\n", "style Round End Table\n", "material Solid + Manufactured Wood,Particle Board/Chipb...\n", "color Pink\n", "url https://www.amazon.com/dp/B01B65BYYI\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 68, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Flash Furniture Diamond Black Vinyl Luxurious ...\n", "primary_image https://m.media-amazon.com/images/I/41LYsAMww6...\n", "style Fixed\n", "material Foam\n", "color Black Vinyl\n", "url https://www.amazon.com/dp/B000TMHWGO\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 69, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Gatco 1918, Modern Rectangle Waste Basket, Mat...\n", "primary_image https://m.media-amazon.com/images/I/31dnAVaEmv...\n", "style Rectangle\n", "material Stainless Steel\n", "color Matte Black\n", "url https://www.amazon.com/dp/B07TXMJ5FQ\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 70, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Winrise Office Chair Ergonomic Desk Chair, Hig...\n", "primary_image https://m.media-amazon.com/images/I/41hCFaVIC+...\n", "style Straight\n", "material Sponge\n", "color S-black\n", "url https://www.amazon.com/dp/B0CGQZBCZP\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 71, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Adeco Euro Style Fabric Arm Bench Chair Footst...\n", "primary_image https://m.media-amazon.com/images/I/41hUc8c+DC...\n", "style Modern\n", "material Engineered Wood\n", "color Brown\n", "url https://www.amazon.com/dp/B017TNJR72\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 72, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Motiv 0202/PC Sine 18-In Towel Bar, Polished C...\n", "primary_image https://m.media-amazon.com/images/I/31a6GfenW0...\n", "style NaN\n", "material Brass\n", "color 18\" Towel Bar\n", "url https://www.amazon.com/dp/B001AS8D82\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 73, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Imports Décor PVC Backed Coir Doormat, Eighth ...\n", "primary_image https://m.media-amazon.com/images/I/51H9lDOICr...\n", "style Art Deco\n", "material Vinyl\n", "color Black and Beige\n", "url https://www.amazon.com/dp/B08WF83LMF\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 74, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Croydex Chester Square Flexi-Fix Wall Mounted ...\n", "primary_image https://m.media-amazon.com/images/I/41sDO1HW2c...\n", "style NaN\n", "material NaN\n", "color Silver\n", "url https://www.amazon.com/dp/B09DGFRM4B\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 75, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title itbe Easy Fit Ready-to-Assemble Multipurpose O...\n", "primary_image https://m.media-amazon.com/images/I/21NWASZgUV...\n", "style Flat Panel\n", "material Alloy Steel\n", "color Blue\n", "url https://www.amazon.com/dp/B09FR4XSCT\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 76, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Delta ARV18-DN Arvo 18-in Wall Mount Towel Bar...\n", "primary_image https://m.media-amazon.com/images/I/11zzs81fXB...\n", "style 18\" Towel Bar with 6\" Extender\n", "material Multiple Base Materials\n", "color Spotshield Brushed Nickel\n", "url https://www.amazon.com/dp/B09LVSZRZS\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 77, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Bamboo Waste Basket | Waste Basket for Bathroo...\n", "primary_image https://m.media-amazon.com/images/I/318RY00VlI...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B08VWTB8CH\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 78, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Way Basics Vinyl Record Storage - 2 Tier Book ...\n", "primary_image https://m.media-amazon.com/images/I/41YMttt7a5...\n", "style Modern\n", "material Recycled Material\n", "color White\n", "url https://www.amazon.com/dp/B075M1PKSW\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 79, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title TocTen Double Bath Towel Bar - Thicken SUS304 ...\n", "primary_image https://m.media-amazon.com/images/I/41cFJKXyA5...\n", "style NaN\n", "material Stainless Steel\n", "color Matte Black\n", "url https://www.amazon.com/dp/B0BWRVGQRM\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 80, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title MoNiBloom Adjustable Bar Stools Set of 2, 360°...\n", "primary_image https://m.media-amazon.com/images/I/41jD28iN4b...\n", "style Straight\n", "material NaN\n", "color Dark Grey\n", "url https://www.amazon.com/dp/B0CB7SG59J\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 81, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title LANTEFUL Shoe Rack Organizer Shoe Storage Cabi...\n", "primary_image https://m.media-amazon.com/images/I/51e8SrHHW3...\n", "style free standing shoe racks\n", "material NaN\n", "color Black\n", "url https://www.amazon.com/dp/B0C3QDL2XW\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 82, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title ANDY STAR 24x32 INCH Brushed Nickel Mirror, Ro...\n", "primary_image https://m.media-amazon.com/images/I/41MQWfATgg...\n", "style NaN\n", "material Stainless Steel\n", "color Brushed Nickel\n", "url https://www.amazon.com/dp/B0CBRGS5D7\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 83, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title MJL Furniture Designs Upholstered Cubed/Square...\n", "primary_image https://m.media-amazon.com/images/I/410tv-zDYX...\n", "style Contemporary\n", "material Wood\n", "color Smoke Grey\n", "url https://www.amazon.com/dp/B01D378FYE\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 84, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Cpintltr Small Foot Stool Ottoman Modern Accen...\n", "primary_image https://m.media-amazon.com/images/I/51CjfUJVuL...\n", "style NaN\n", "material Pine\n", "color Green\n", "url https://www.amazon.com/dp/B0CKPFKDZY\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 85, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title YuiHome Extendable Round, Farmhouse 16\" Leaf T...\n", "primary_image https://m.media-amazon.com/images/I/5175Qzg03L...\n", "style Farmhouse\n", "material Rubber Wood, Engineered Wood\n", "color Natural Wood Wash\n", "url https://www.amazon.com/dp/B0CHVQ6BC5\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 86, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Ergonomic Office Chair,Office Chair, with Lumb...\n", "primary_image https://m.media-amazon.com/images/I/51vnoZERmP...\n", "style With arms\n", "material Foam\n", "color All Black\n", "url https://www.amazon.com/dp/B0CBBV4S1P\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 87, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Kate and Laurel Celia Round Metal Foldable Acc...\n", "primary_image https://m.media-amazon.com/images/I/31ZMqrgDD8...\n", "style Modern\n", "material Iron\n", "color Black\n", "url https://www.amazon.com/dp/B084WLY61H\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 88, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Lizipai Floating Bedside Table, No Assembly Re...\n", "primary_image https://m.media-amazon.com/images/I/41HBX6be98...\n", "style no\n", "material Wood\n", "color White\n", "url https://www.amazon.com/dp/B09NBWCTDS\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 89, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title CordaRoy's Chenille Bean Bag Ottoman Footstool...\n", "primary_image https://m.media-amazon.com/images/I/51HpCirQNA...\n", "style Modern\n", "material Engineered Wood\n", "color Rainforest\n", "url https://www.amazon.com/dp/B0BSZ96YG7\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 90, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Plebs Home Solid Desktop Store Cart, with Rubb...\n", "primary_image https://m.media-amazon.com/images/I/51WFQwBEqj...\n", "style Slab\n", "material Wood\n", "color Dark Blue\n", "url https://www.amazon.com/dp/B0CD7FSWMK\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 91, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title ErGear Ergonomic Desk Chair, Office Chair with...\n", "primary_image https://m.media-amazon.com/images/I/41C4FUmS-h...\n", "style With arms\n", "material Memory Foam\n", "color Black\n", "url https://www.amazon.com/dp/B0C99D3V15\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 92, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Kingston Brass Millennium Towel-Ring, 7.63\", O...\n", "primary_image https://m.media-amazon.com/images/I/31+kzwXTjx...\n", "style NaN\n", "material Brass\n", "color Oil Rubbed Bronze\n", "url https://www.amazon.com/dp/B00FM0WG7I\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 93, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Homebeez 18.9\" Round Velvet Storage Ottoman Mu...\n", "primary_image https://m.media-amazon.com/images/I/51vTxE-9lH...\n", "style Modern\n", "material Wood\n", "color Orange\n", "url https://www.amazon.com/dp/B09DKG6JDN\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 94, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Mickey and Friends Collapsible Nylon Basket Bu...\n", "primary_image https://m.media-amazon.com/images/I/410mEc5bbl...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0B7Q5LB2C\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 95, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Homepop Home Decor | Backless Nailhead Trim Co...\n", "primary_image https://m.media-amazon.com/images/I/41HPIScA4s...\n", "style Contemporary\n", "material NaN\n", "color Blue\n", "url https://www.amazon.com/dp/B01LWPSVUW\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 96, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Camco Life Is Better at The Campsite Outdoor &...\n", "primary_image https://m.media-amazon.com/images/I/51DN2is3Zj...\n", "style Outdoor & Indoor\n", "material Rubber\n", "color Blue\n", "url https://www.amazon.com/dp/B07D7RQNJV\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 97, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title MoNiBloom Round Folding Faux Fur Saucer Chair ...\n", "primary_image https://m.media-amazon.com/images/I/41eoFKL3gK...\n", "style Modern\n", "material Polyester\n", "color Burgundy\n", "url https://www.amazon.com/dp/B0CD7TH3BF\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 98, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title YMYNY Vanity Stool Chair with Storage, Square ...\n", "primary_image https://m.media-amazon.com/images/I/519Am3LPMv...\n", "style Modern\n", "material NaN\n", "color Dusty Blue\n", "url https://www.amazon.com/dp/B0C1NSNDW2\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 99, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Casual Home 5 Piece Tray Table Set, Espresso\n", "primary_image https://m.media-amazon.com/images/I/41WweDJqgZ...\n", "style Tray Table Set\n", "material Wood\n", "color Espresso\n", "url https://www.amazon.com/dp/B0069H9BYO\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 100, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Simplify Hanging Grey 20-Pocket Shoe Boho Clos...\n", "primary_image https://m.media-amazon.com/images/I/41eYiOqsld...\n", "style NaN\n", "material 80% Linen printed nonwoven +20% solid nonwoven...\n", "color Grey\n", "url https://www.amazon.com/dp/B09J1RM23P\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 101, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Get Set Style Black Glass Side Table, Square G...\n", "primary_image https://m.media-amazon.com/images/I/51gG6ukN1n...\n", "style Modern and Elegant\n", "material Tempered Glass\n", "color Shiny Black\n", "url https://www.amazon.com/dp/B0C5DH6ZY6\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 102, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Watson & Whitely Swivel Bar Stools Set of 2, F...\n", "primary_image https://m.media-amazon.com/images/I/41nDc6aFKo...\n", "style Modern\n", "material NaN\n", "color Black\n", "url https://www.amazon.com/dp/B0CKQTTZ5V\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 103, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Sweet Jojo Designs Boho Rainbow Girl Ottoman P...\n", "primary_image https://m.media-amazon.com/images/I/31nn4NwuKf...\n", "style Shabby Chic\n", "material Engineered Wood\n", "color Multi Color\n", "url https://www.amazon.com/dp/B0BZJYM4Q6\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 104, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Pekokavo Sofa Arm Clip Tray, Side Table for Re...\n", "primary_image https://m.media-amazon.com/images/I/51yz-83kj+...\n", "style Modern\n", "material Bamboo\n", "color Bamboo\n", "url https://www.amazon.com/dp/B08SL4GH7G\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 105, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Caroline's Treasures JMA2013HRM2858 Seaweed Sa...\n", "primary_image https://m.media-amazon.com/images/I/514qJ5aPtb...\n", "style Modern\n", "material Rubber\n", "color Multicolored\n", "url https://www.amazon.com/dp/B07SPYM4M5\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 106, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Xchouxer Side Tables Natural Bamboo Sofa Armre...\n", "primary_image https://m.media-amazon.com/images/I/511LXRAxI+...\n", "style Modern\n", "material Bamboo\n", "color Beige\n", "url https://www.amazon.com/dp/B08FC5HPBS\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 107, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Montessori Learning Toddler Tower, Foldable To...\n", "primary_image https://m.media-amazon.com/images/I/51n9ojprZE...\n", "style Modern\n", "material Wood\n", "color Wood\n", "url https://www.amazon.com/dp/B0CKMRJ1H9\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 108, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title PAK HOME Set of 2 High Gloss Brown Marble Look...\n", "primary_image https://m.media-amazon.com/images/I/51u3oxvEiS...\n", "style Tripod\n", "material Wood\n", "color Brown Marble High Gloss / Gold Legs\n", "url https://www.amazon.com/dp/B09K3MYL91\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 109, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title kukli kitchen Spring Door Mat 30 X 17 Inch - S...\n", "primary_image https://m.media-amazon.com/images/I/61rRHgR+aE...\n", "style Classic\n", "material Rubber\n", "color Color-33\n", "url https://www.amazon.com/dp/B0BNL8CC5X\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 110, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Dewhut Oversized Pumpkin Couch Accent Chair, M...\n", "primary_image https://m.media-amazon.com/images/I/519KoH2aW4...\n", "style Modern\n", "material Sponge\n", "color Navy\n", "url https://www.amazon.com/dp/B0CF8HTCS4\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 111, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Toland Home Garden 800009 Gypsy Garden Flower ...\n", "primary_image https://m.media-amazon.com/images/I/61gTdPHg5Q...\n", "style Outdoor & Indoor\n", "material Rubber\n", "color NaN\n", "url https://www.amazon.com/dp/B00PNJAACG\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 112, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Sintosin Vintage Oval Mirrors for Wall Decor 1...\n", "primary_image https://m.media-amazon.com/images/I/41NiOP0+4j...\n", "style Shabby Chic\n", "material Wood\n", "color Oval\n", "url https://www.amazon.com/dp/B0BWJLZF5G\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 113, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title BEWISHOME Vanity Stool, Bedroom Vanity Chair w...\n", "primary_image https://m.media-amazon.com/images/I/410emoPl2k...\n", "style Modern\n", "material NaN\n", "color Black\n", "url https://www.amazon.com/dp/B0B6FML1VS\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 114, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Children's Factory School Age High Back Lounge...\n", "primary_image https://m.media-amazon.com/images/I/51ORnRyifR...\n", "style Single Seat\n", "material NaN\n", "color Blue-red\n", "url https://www.amazon.com/dp/B00740P05Y\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 115, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title FLYJOE Shoe Rack Bench, 3-Tier Freestanding Wo...\n", "primary_image https://m.media-amazon.com/images/I/51WQiiIyuS...\n", "style NaN\n", "material NaN\n", "color Rustic Walnut\n", "url https://www.amazon.com/dp/B0CN8NXR1Q\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 116, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title FLYZC Counter Height Bar Stools Set of 4, Stoo...\n", "primary_image https://m.media-amazon.com/images/I/51jw0SXQMW...\n", "style Straight\n", "material NaN\n", "color Grey & Black\n", "url https://www.amazon.com/dp/B0CH862BV2\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 117, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title SITMOD Gaming Chairs for Adults with Footrest-...\n", "primary_image https://m.media-amazon.com/images/I/41bntfm39U...\n", "style With arms\n", "material Memory Foam\n", "color Grey\n", "url https://www.amazon.com/dp/B0B3HM3FTZ\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 118, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title CM Cosmos Stuffed Animal Storage Bean Bag Chai...\n", "primary_image https://m.media-amazon.com/images/I/41XEtwrKqo...\n", "style NaN\n", "material NaN\n", "color Grey & White\n", "url https://www.amazon.com/dp/B07JCPZDSL\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 119, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Cionyce 4 Pcs Sectional Couch Connectors, Pin ...\n", "primary_image https://m.media-amazon.com/images/I/41sejv2mO6...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B09V6RSWSR\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 120, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Tiita Saucer Chair with Ottoman, Soft Faux Fur...\n", "primary_image https://m.media-amazon.com/images/I/51C5YkDdUy...\n", "style Garden\n", "material NaN\n", "color Beige With Ottoman\n", "url https://www.amazon.com/dp/B0BWDJ8NSM\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 121, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Grandmother Birthday Gifts Compact Makeup Mirr...\n", "primary_image https://m.media-amazon.com/images/I/417J95lDDa...\n", "style NaN\n", "material Stainless Steel\n", "color For Grandmother\n", "url https://www.amazon.com/dp/B0C289KQNK\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 122, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title GIA 24-Inch Counter Height Square Backless Met...\n", "primary_image https://m.media-amazon.com/images/I/414M2Vz5Yj...\n", "style Straight\n", "material NaN\n", "color Black\n", "url https://www.amazon.com/dp/B0B75Z1T2H\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 123, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Vintage Desktop Apothecary Cabinet with 3 Draw...\n", "primary_image https://m.media-amazon.com/images/I/41yz4PMNd0...\n", "style drawer,wood\n", "material Wood\n", "color Mahogany Wood Brown\n", "url https://www.amazon.com/dp/B0B24KQJS9\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 124, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title WAYTRIM Dresser Storage Tower, 4 Fabric Organi...\n", "primary_image https://m.media-amazon.com/images/I/41DfHAtQUK...\n", "style Modern\n", "material NaN\n", "color Camel\n", "url https://www.amazon.com/dp/B07W56HHX5\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 125, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Power Recliner Power Supply Kit-4-Piece Univer...\n", "primary_image https://m.media-amazon.com/images/I/51N6Zq4kxx...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0BHVLGGYL\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 126, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Anna Stay Wine Rack Wall Mounted - Decorative ...\n", "primary_image https://m.media-amazon.com/images/I/51K1wX04DX...\n", "style Modern\n", "material NaN\n", "color Wine Gold\n", "url https://www.amazon.com/dp/B09ZQM2FX3\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 127, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Lufeiya Small Computer Desk with 2 Drawers for...\n", "primary_image https://m.media-amazon.com/images/I/41zNNJV-QU...\n", "style Country Rustic\n", "material Engineered Wood\n", "color Rustic Brown\n", "url https://www.amazon.com/dp/B0CB5G1BHX\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 128, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Watson & Whitely Swivel Bar Stools Set of 2, F...\n", "primary_image https://m.media-amazon.com/images/I/41IWqaJGuW...\n", "style Modern\n", "material NaN\n", "color White (Multi-colored)\n", "url https://www.amazon.com/dp/B0BV6KR1T7\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 129, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Adeco Large Square Storage Ottoman Bench, Tuft...\n", "primary_image https://m.media-amazon.com/images/I/31HEdjZpCb...\n", "style Mid-Century Modern\n", "material Wood\n", "color Orange Brown\n", "url https://www.amazon.com/dp/B0C6XNNL9M\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 130, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title New Classic Furniture Evander Wood End Table w...\n", "primary_image https://m.media-amazon.com/images/I/51TJVV3sRq...\n", "style Contemporary\n", "material Wood\n", "color Two Tone Cream/Brown\n", "url https://www.amazon.com/dp/B0B6YR22H1\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 131, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Lipper International Wooden Storage Crate, whi...\n", "primary_image https://m.media-amazon.com/images/I/31MZPtCF0R...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B07MZRYQ2X\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 132, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Amazon Basics Kids Adjustable Mesh Low-Back Sw...\n", "primary_image https://m.media-amazon.com/images/I/41bsjzUI6N...\n", "style Mesh\n", "material NaN\n", "color Red\n", "url https://www.amazon.com/dp/B0BHF9PPJC\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 133, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Joovy Coo Bassinet, Portable Bassinet with Sto...\n", "primary_image https://m.media-amazon.com/images/I/41UOfS3Jmk...\n", "style NaN\n", "material fabric\n", "color NaN\n", "url https://www.amazon.com/dp/B07NFSLLCG\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 134, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Halatua 6ftlarge Fur Bean Bag Cover Lazy Sofa ...\n", "primary_image https://m.media-amazon.com/images/I/51-utQ4pnb...\n", "style NaN\n", "material Polyester\n", "color Snowblue\n", "url https://www.amazon.com/dp/B0C7L8GGJF\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 135, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Flash Furniture Walker Small Rustic Natural Ho...\n", "primary_image https://m.media-amazon.com/images/I/31QOFqtaHJ...\n", "style Sled\n", "material Engineered Wood\n", "color Rustic\n", "url https://www.amazon.com/dp/B08JWJTZ1Y\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 136, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title BOKKOLIK Vintage Bar Stools Swivel PU Seat 29-...\n", "primary_image https://m.media-amazon.com/images/I/41PjcPoHTL...\n", "style Soft PU Seat\n", "material NaN\n", "color Dark Brown\n", "url https://www.amazon.com/dp/B0BG7MX77T\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 137, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Nalupatio Storage Ottoman, Bedroom End Bench,U...\n", "primary_image https://m.media-amazon.com/images/I/31+6K0Tbdp...\n", "style Modern\n", "material Wood\n", "color Light Green\n", "url https://www.amazon.com/dp/B0C48X7JQB\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 138, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Homevany Bamboo Wine Rack,4 Tier, Wine Bottle ...\n", "primary_image https://m.media-amazon.com/images/I/51DO5hfgdK...\n", "style Modern\n", "material NaN\n", "color Brown\n", "url https://www.amazon.com/dp/B08T8ZRZ1F\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 139, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Armen Living Julius 30\" Cream Faux Leather and...\n", "primary_image https://m.media-amazon.com/images/I/31v34T0kgn...\n", "style Straight\n", "material NaN\n", "color Cream/Walnut\n", "url https://www.amazon.com/dp/B0961N94SZ\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 140, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title WONSTART Vanity Mirror with Lights, 50 x 41cm ...\n", "primary_image https://m.media-amazon.com/images/I/41k7g8oo6b...\n", "style Modern\n", "material Aluminum, Glass\n", "color Silver\n", "url https://www.amazon.com/dp/B0C2VF2S6R\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 141, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Cpintltr Velvet Foot Rest Stool Multipurpose D...\n", "primary_image https://m.media-amazon.com/images/I/51K84REZCG...\n", "style Modern\n", "material Wood\n", "color Dusty Pink\n", "url https://www.amazon.com/dp/B0CH34CCLV\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 142, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title uxcell Shredded Memory Foam Filling, 10 Pounds...\n", "primary_image https://m.media-amazon.com/images/I/51i6LeHlc9...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0C4DWRF3M\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 143, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title FAMSINGO Ergonomic Mesh Office Chair, High Bac...\n", "primary_image https://m.media-amazon.com/images/I/41Jm-GtY+5...\n", "style With arms\n", "material Memory Foam\n", "color Black\n", "url https://www.amazon.com/dp/B0CBBMQPVC\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 144, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Serta Style Hannah II Office Chair, Harvard Pi...\n", "primary_image https://m.media-amazon.com/images/I/41XQ7R6j7l...\n", "style with-arms\n", "material Foam\n", "color Harvard Pink\n", "url https://www.amazon.com/dp/B07667648L\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 145, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Christmas 3D Illusion Doormat, Non-Slip Visual...\n", "primary_image https://m.media-amazon.com/images/I/51uOa02x4H...\n", "style Classic\n", "material 棉质\n", "color Red\n", "url https://www.amazon.com/dp/B0CC28VDSV\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 146, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Narrow Console Table with Power Strips, Sofa T...\n", "primary_image https://m.media-amazon.com/images/I/51FRxl-qgF...\n", "style Sofa Table with Outlets\n", "material MDF Board and Metal\n", "color Black\n", "url https://www.amazon.com/dp/B0BSHFVY3J\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 147, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title AnRui Folding Floor Chair with Adjustable Back...\n", "primary_image https://m.media-amazon.com/images/I/51iuIrMVq+...\n", "style Solid Back\n", "material Foam\n", "color Stripe\n", "url https://www.amazon.com/dp/B08QRF4TTL\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 148, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title sogesfurniture 5 Tier Free Standing Wooden Sho...\n", "primary_image https://m.media-amazon.com/images/I/51j2v3ij2u...\n", "style Modern\n", "material Engineered Wood\n", "color NaN\n", "url https://www.amazon.com/dp/B07WLK9TNS\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 149, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title fengxiaomin-Plastic Bed Slat End Caps Holders ...\n", "primary_image https://m.media-amazon.com/images/I/41gvi7RjrZ...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0CNVJ24YF\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 150, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title MoNiBloom Massage Gaming Recliner Chair with S...\n", "primary_image https://m.media-amazon.com/images/I/41Md8gR4YY...\n", "style Modern\n", "material NaN\n", "color Green\n", "url https://www.amazon.com/dp/B0BZKMYST2\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 151, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title SUNSLASH Wall Mounted Mirror, Arched Wall Mirr...\n", "primary_image https://m.media-amazon.com/images/I/41nGiqXS+5...\n", "style NaN\n", "material Aluminum\n", "color Black(arched)\n", "url https://www.amazon.com/dp/B0BP9QYFTL\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 152, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Allied Brass Carolina Crystal Collection Frame...\n", "primary_image https://m.media-amazon.com/images/I/21+UCtQ6p9...\n", "style Antique\n", "material Brass\n", "color Antique Brass\n", "url https://www.amazon.com/dp/B07ZSF42WD\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 153, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Home Source 40.7' Elegance Bar Server and Wine...\n", "primary_image https://m.media-amazon.com/images/I/41nYPK8Xbr...\n", "style Fluted shape\n", "material Walnut Wood\n", "color Walnut\n", "url https://www.amazon.com/dp/B0CN1LGXNP\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 154, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Shintenchi 60\" Small Loveseat, 3 in 1 Cute Con...\n", "primary_image https://m.media-amazon.com/images/I/41SkpIbGdQ...\n", "style Pillow-Top\n", "material Wood\n", "color Dark Gray\n", "url https://www.amazon.com/dp/B0CMTHD198\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 155, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title King Mattresses Bag for Moving Storage Protect...\n", "primary_image https://m.media-amazon.com/images/I/41ye8pFDZ9...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0CN44TTFJ\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 156, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title sawsile Asymmetrical Wall Mirror,Unique Gold V...\n", "primary_image https://m.media-amazon.com/images/I/41G-NEOXwf...\n", "style NaN\n", "material Wood, Iron\n", "color Gold\n", "url https://www.amazon.com/dp/B0CDWH5PQP\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 157, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Leather At Home, Decorative 13 Inch Rounded Pi...\n", "primary_image https://m.media-amazon.com/images/I/51ePbFDPNR...\n", "style Classic\n", "material Leather\n", "color Bourbon Brown\n", "url https://www.amazon.com/dp/B0BBKQ3XW9\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 158, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Hzuaneri Blanket Ladder Shelf for Living Room,...\n", "primary_image https://m.media-amazon.com/images/I/31XETwaX0W...\n", "style Farmhouse\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0BSKY28M7\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 159, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title 9 Inch lighted magnifying mirror with Adjustab...\n", "primary_image https://m.media-amazon.com/images/I/41j2FBzCCJ...\n", "style Modern\n", "material Alloy Steel\n", "color Brushed Nickel\n", "url https://www.amazon.com/dp/B0CMJCCT9C\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 160, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title shopperals Large Black Fogless Handheld Shavin...\n", "primary_image https://m.media-amazon.com/images/I/413+UE2HxQ...\n", "style NaN\n", "material Plastic\n", "color Black\n", "url https://www.amazon.com/dp/B0CJCRFZCG\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 161, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Convenience Concepts French Country Desk, Drif...\n", "primary_image https://m.media-amazon.com/images/I/21Xa4sH6hP...\n", "style French Country\n", "material Engineered Wood\n", "color Driftwood/White\n", "url https://www.amazon.com/dp/B07D6TS5MR\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 162, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title FurnitureR 27''H Round Drawer 2 Tiers Endtable...\n", "primary_image https://m.media-amazon.com/images/I/51VXthftc3...\n", "style Mid-Century Modern\n", "material Engineered Wood\n", "color Green and Brown\n", "url https://www.amazon.com/dp/B0BVYQTMNX\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 163, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Flash Furniture Contemporary Red Vinyl Rounded...\n", "primary_image https://m.media-amazon.com/images/I/41OOyTZhTz...\n", "style Contemporary\n", "material NaN\n", "color Red\n", "url https://www.amazon.com/dp/B00EAY2HTY\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 164, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Stylish Camping Ming's Mark RC4 Reversible Cla...\n", "primary_image https://m.media-amazon.com/images/I/515xhjtnk0...\n", "style Modern\n", "material Polypropylene\n", "color Green/Beige\n", "url https://www.amazon.com/dp/B0044G9M2S\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 165, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Christopher Knight Home Adelina Fabric Occaisi...\n", "primary_image https://m.media-amazon.com/images/I/41FESwmeXb...\n", "style Wing Back\n", "material NaN\n", "color Light Lavender\n", "url https://www.amazon.com/dp/B073GLR1DG\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 166, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title ODK Small Computer Desk, 27.5 inch Desk for Sm...\n", "primary_image https://m.media-amazon.com/images/I/41meqsf8aq...\n", "style Modern\n", "material Engineered Wood\n", "color Pure White\n", "url https://www.amazon.com/dp/B092HVNQQ4\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 167, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title GOmaize Cute Wall Mirror with 4 Layers of Colo...\n", "primary_image https://m.media-amazon.com/images/I/417WwDOB5X...\n", "style Bohemian\n", "material Plastic\n", "color Blue\n", "url https://www.amazon.com/dp/B0CB6HZR7Z\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 168, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title huester What are You Doing in My Swamp Door Ma...\n", "primary_image https://m.media-amazon.com/images/I/51L59TyllJ...\n", "style Farmhouse\n", "material Rubber\n", "color NaN\n", "url https://www.amazon.com/dp/B0C8SGN73S\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 169, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Bedstory 3 Inch Queen Size Memory Foam Mattres...\n", "primary_image https://m.media-amazon.com/images/I/516PONoRDr...\n", "style NaN\n", "material Memory Foam\n", "color White\n", "url https://www.amazon.com/dp/B0B31DB3LN\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 170, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Toland Home Garden 800252 Birthday Bash Party ...\n", "primary_image https://m.media-amazon.com/images/I/51rfyHppFm...\n", "style Modern\n", "material Rubber\n", "color Balloon Outdoor Doormat for Entryway Indoor En...\n", "url https://www.amazon.com/dp/B01AA0SO7A\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 171, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Asense Small Footstool Ottoman Set of 2, Faux ...\n", "primary_image https://m.media-amazon.com/images/I/31mK9NtBNH...\n", "style Modern\n", "material NaN\n", "color 2 Pack Faux Leather Celadon\n", "url https://www.amazon.com/dp/B0CPLSTFW5\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 172, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title PINGEUI 2 Packs 13 Inches Bamboo Step Stool, N...\n", "primary_image https://m.media-amazon.com/images/I/41Y0vrrtp7...\n", "style Modern\n", "material Bamboo\n", "color Brown\n", "url https://www.amazon.com/dp/B099VZPTWT\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 173, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Poundex Y1553 Two Piece PU Round Shape Barstoo...\n", "primary_image https://m.media-amazon.com/images/I/31XVd1lG-z...\n", "style Modern\n", "material NaN\n", "color Black\n", "url https://www.amazon.com/dp/B0183K9SMO\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 174, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title SP-AU-Era Mirror cabinet storage box, cosmetic...\n", "primary_image https://m.media-amazon.com/images/I/61zDAVHDAf...\n", "style Wall-mounted Perforated Home Bathroom Sink, Co...\n", "material PET\n", "color blackish green\n", "url https://www.amazon.com/dp/B0C99SY5W2\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 175, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Kavonty Storage Chest, Storage Bench, Retro To...\n", "primary_image https://m.media-amazon.com/images/I/41YpXf+0X2...\n", "style NaN\n", "material NaN\n", "color Rustic Brown\n", "url https://www.amazon.com/dp/B0BB9RZ19N\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 176, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Barkan TV Wall Mount, 32-70 inch Full Motion A...\n", "primary_image https://m.media-amazon.com/images/I/41NgcrmTA7...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B01L0YHBB0\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 177, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title danpinera Side Table Round Metal, Outdoor Side...\n", "primary_image https://m.media-amazon.com/images/I/41fuboxDT3...\n", "style Modern\n", "material Iron\n", "color Light Green\n", "url https://www.amazon.com/dp/B09FXM34DV\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 178, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Dscabomlg Foldable Shoe Storage Plastic Vertic...\n", "primary_image https://m.media-amazon.com/images/I/41bq4r8uj5...\n", "style Modern\n", "material NaN\n", "color Grey&white\n", "url https://www.amazon.com/dp/B0CG5SJN86\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 179, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title ACCHAR Ergonomic Office Chair, Reclining Mesh ...\n", "primary_image https://m.media-amazon.com/images/I/413qdlao4p...\n", "style With arms\n", "material Foam\n", "color White\n", "url https://www.amazon.com/dp/B0C2C9S1R6\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 180, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title ODK Small Computer Desk, 27.5 Inch, Compact Ti...\n", "primary_image https://m.media-amazon.com/images/I/41NmfAngKl...\n", "style Modern\n", "material Engineered Wood\n", "color Black\n", "url https://www.amazon.com/dp/B08CB925CT\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 181, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Front Door Mats by ZULINE,Entry and Back Yard ...\n", "primary_image https://m.media-amazon.com/images/I/51+qRIvl1F...\n", "style Outdoor & Indoor\n", "material Rubber\n", "color Brown-diamond\n", "url https://www.amazon.com/dp/B09PBH963M\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 182, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title MyGift Modern Over The Door Towel Rack in Shab...\n", "primary_image https://m.media-amazon.com/images/I/515aoZQHoA...\n", "style NaN\n", "material Metal\n", "color Whitewashed Wood & Black Metal\n", "url https://www.amazon.com/dp/B0C5BBYRDN\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 183, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title WEENFON Storage Cabinet with Doors and Shelves...\n", "primary_image https://m.media-amazon.com/images/I/51F9Edov14...\n", "style Shaker\n", "material Engineered Wood\n", "color Grey\n", "url https://www.amazon.com/dp/B0BF8KWBR2\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 184, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title SOOWERY End Tables with Charging Station, Set ...\n", "primary_image https://m.media-amazon.com/images/I/41x2Yzpw5a...\n", "style Retro\n", "material Iron\n", "color Brown\n", "url https://www.amazon.com/dp/B0BRFX55TJ\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 185, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Bednowitz Twin Box Spring,5 Inch Low Profile M...\n", "primary_image https://m.media-amazon.com/images/I/51rTEhx3EA...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0CJR8KM2D\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 186, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title BOKKOLIK Industrial Bar Stools (Set of 2) Coun...\n", "primary_image https://m.media-amazon.com/images/I/41r1PM96rV...\n", "style industrial/retro/rustic/vintage/farmhouse/chic\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0BJZPV117\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 187, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title HOOBRO Over The Toilet Storage Cabinet, Mass-S...\n", "primary_image https://m.media-amazon.com/images/I/41i8ryTI4h...\n", "style louver\n", "material Engineered Wood, Metal\n", "color Rustic Brown\n", "url https://www.amazon.com/dp/B0B31G7LBC\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 188, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Hanover Swivel Counter Height Bar Stool, White...\n", "primary_image https://m.media-amazon.com/images/I/31039iD-Mp...\n", "style Classic\n", "material NaN\n", "color White and Gray\n", "url https://www.amazon.com/dp/B0B97PJ94P\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 189, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title VECELO Modern Industrial Style 3-Piece Dining ...\n", "primary_image https://m.media-amazon.com/images/I/41rj5r2UFS...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B09MS5RJTT\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 190, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Tenkovic Metal Coat Rack Stand with Quartz Bas...\n", "primary_image https://m.media-amazon.com/images/I/31N5mQxbhB...\n", "style NaN\n", "material Metal, Wood\n", "color tree gold\n", "url https://www.amazon.com/dp/B0BZCMCJDY\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 191, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title FANYE Oversized 6 Seaters Modular Storage Sect...\n", "primary_image https://m.media-amazon.com/images/I/41MTr4ynO3...\n", "style Track\n", "material Wood\n", "color Navy Blue\n", "url https://www.amazon.com/dp/B0CP7YFXD2\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 192, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title HOMSHO 2-Tier Storage Bench,Shoe Bench with Pa...\n", "primary_image https://m.media-amazon.com/images/I/41Sq7pT7XM...\n", "style NaN\n", "material NaN\n", "color White\n", "url https://www.amazon.com/dp/B0BY23W1J9\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 193, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Realhotan 18 Inch Twin Bed Frame 3500 Pounds H...\n", "primary_image https://m.media-amazon.com/images/I/51+pTJO13K...\n", "style NaN\n", "material NaN\n", "color Black\n", "url https://www.amazon.com/dp/B0CCCS3RB9\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 194, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Kwikset BTBNC1C Pfister Bath Hardware, 18\", Po...\n", "primary_image https://m.media-amazon.com/images/I/31A+awsgcP...\n", "style Contemporary\n", "material Zinc\n", "color Polished Chrome\n", "url https://www.amazon.com/dp/B00JMTNK0W\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 195, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title MAHANCRIS End Table Set of 2, Side Table with ...\n", "primary_image https://m.media-amazon.com/images/I/41wsItqcjU...\n", "style Straight Leg\n", "material Engineered Wood\n", "color Rustic Brown + Black\n", "url https://www.amazon.com/dp/B0CJNJMY5H\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 196, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Moen MY3786CH Idora Single Post Bathroom Hand ...\n", "primary_image https://m.media-amazon.com/images/I/41LVA3Tody...\n", "style NaN\n", "material Zinc\n", "color Chrome\n", "url https://www.amazon.com/dp/B0882HQRJX\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 197, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Roundhill Furniture Swivel Black Bonded Leathe...\n", "primary_image https://m.media-amazon.com/images/I/31VM2JhRDZ...\n", "style Modern\n", "material NaN\n", "color Black\n", "url https://www.amazon.com/dp/B00D93AT24\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 198, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title PINPLUS Storage Ottoman Bench, Linen Coffee Ta...\n", "primary_image https://m.media-amazon.com/images/I/41gj8mVGFG...\n", "style Modern\n", "material Engineered Wood\n", "color White\n", "url https://www.amazon.com/dp/B0BZ3RYRNY\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 199, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Red Co. 14 x 18 inch Large Decorative Frameles...\n", "primary_image https://m.media-amazon.com/images/I/21M6+MAnWp...\n", "style Modern\n", "material Glass\n", "color Silver\n", "url https://www.amazon.com/dp/B087Z3RXLN\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 200, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title PONTMENT Foot Stool Leather Footstool Solid Wo...\n", "primary_image https://m.media-amazon.com/images/I/51ElPbhgU7...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0C38VPJ15\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 201, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Kingston Brass BA2714C Milano Towel-Ring, 6-In...\n", "primary_image https://m.media-amazon.com/images/I/41X7yXWQ+P...\n", "style Contemporary\n", "material Brass\n", "color Polished Chrome\n", "url https://www.amazon.com/dp/B0003SDM18\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 202, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Lazy Chair with Ottoman, Modern Lounge Accent ...\n", "primary_image https://m.media-amazon.com/images/I/415U1ul6gp...\n", "style NaN\n", "material NaN\n", "color Grey\n", "url https://www.amazon.com/dp/B0CCRXWDF1\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 203, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title latifolia Shoe Cabinet, Vintage Shoe Storage C...\n", "primary_image https://m.media-amazon.com/images/I/41Mst-29Zd...\n", "style Modern\n", "material Bamboo\n", "color Brown\n", "url https://www.amazon.com/dp/B0CGX7Y9HQ\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 204, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Jumweo Towel Racks for Bathroom, Metal Towel R...\n", "primary_image https://m.media-amazon.com/images/I/411VfNriJE...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0CM6PR2ZB\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 205, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Christopher Knight Home Gentry Bonded Leather ...\n", "primary_image https://m.media-amazon.com/images/I/412PrvRCw-...\n", "style Leather\n", "material Foam\n", "color Black\n", "url https://www.amazon.com/dp/B005FFA3LQ\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 206, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title BokWin 4 Sets No Mortise Bed Rail Fittings Woo...\n", "primary_image https://m.media-amazon.com/images/I/41ocbpXWJg...\n", "style NaN\n", "material Iron\n", "color NaN\n", "url https://www.amazon.com/dp/B09CGPQT1L\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 207, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Simple Deluxe Gaming Chair, Big and Tall Gamer...\n", "primary_image https://m.media-amazon.com/images/I/41ZTMbqu1J...\n", "style With arms\n", "material NaN\n", "color Black\n", "url https://www.amazon.com/dp/B0B51LYB8T\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 208, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title OIGUMR Shield Wall Mirror Mirror Wall Decor Vi...\n", "primary_image https://m.media-amazon.com/images/I/41LSP7xb2q...\n", "style NaN\n", "material Resin\n", "color Gold\n", "url https://www.amazon.com/dp/B0BMXD3D6J\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 209, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title ChooChoo Farmhouse End Table, Modern End Table...\n", "primary_image https://m.media-amazon.com/images/I/41P7V9O6ga...\n", "style Modern\n", "material Engineered Wood\n", "color White and Brown\n", "url https://www.amazon.com/dp/B0CJHT9KH6\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 210, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title ZIYOO Twin Bed Frame 14 Inch High 3 Inches Wid...\n", "primary_image https://m.media-amazon.com/images/I/31dZ6tsbHO...\n", "style NaN\n", "material NaN\n", "color Black\n", "url https://www.amazon.com/dp/B07RY46G23\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 211, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title MoNiBloom Set of 2 Plastic Barstools with PU C...\n", "primary_image https://m.media-amazon.com/images/I/31fCq+IIEu...\n", "style Modern\n", "material NaN\n", "color White\n", "url https://www.amazon.com/dp/B0CB7SM7MM\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 212, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title KingCamp Stable Folding Camping Table Bamboo O...\n", "primary_image https://m.media-amazon.com/images/I/41Sc-GGZBe...\n", "style YELLOW\n", "material Aluminum,Bamboo\n", "color Yellow-27.6\"d X 47.2\"w X 27.56\"h\n", "url https://www.amazon.com/dp/B08ZHPDZX5\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 213, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Artistic Weavers Berma Knitted Jute Round Pouf...\n", "primary_image https://m.media-amazon.com/images/I/51wZvzlzMD...\n", "style Natural\n", "material Engineered Wood\n", "color Slate\n", "url https://www.amazon.com/dp/B00JVZEZE2\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 214, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Dwellicity Hello Welcome Mat Black and Gray St...\n", "primary_image https://m.media-amazon.com/images/I/51nGbm-6b-...\n", "style Modern\n", "material Polyvinyl Chloride\n", "color NaN\n", "url https://www.amazon.com/dp/B099NTP2SZ\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 215, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Lifewit 70.9\" Narrow Long Console Sofa Table w...\n", "primary_image https://m.media-amazon.com/images/I/417XCOhUDg...\n", "style Modern\n", "material Engineered Wood\n", "color Rustic Brown\n", "url https://www.amazon.com/dp/B0BZYWTH2D\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 216, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Henn&Hart 20\" Wide Round Side Table with Mirro...\n", "primary_image https://m.media-amazon.com/images/I/41+Mg7qmpY...\n", "style Side Table\n", "material Glass\n", "color Antique Brass/Mirror\n", "url https://www.amazon.com/dp/B07WK22XDX\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 217, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title klotski Kids Table and 2 Chair Set, Wood Activ...\n", "primary_image https://m.media-amazon.com/images/I/41QhFgJUCg...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0CGZW945K\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 218, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Kraftware Grant Signature Home San Remo Pineco...\n", "primary_image https://m.media-amazon.com/images/I/419nFYjmvG...\n", "style NaN\n", "material Vinyl\n", "color Brown\n", "url https://www.amazon.com/dp/B0751KYGV4\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 219, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Alise Bath 3 Towel Bars,Towel Holder Towel Rac...\n", "primary_image https://m.media-amazon.com/images/I/41frWw+ttR...\n", "style NaN\n", "material Stainless Steel, Metal\n", "color Matte Black\n", "url https://www.amazon.com/dp/B0BGN333H4\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 220, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Round Mirror, Black Round Mirror 24 Inch, Roun...\n", "primary_image https://m.media-amazon.com/images/I/41igYIRb2f...\n", "style Modern\n", "material Metal\n", "color Black\n", "url https://www.amazon.com/dp/B08TTKV6LY\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 221, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Gexpusm Wood Coffee Table, Natural Wood Coffee...\n", "primary_image https://m.media-amazon.com/images/I/51xwMLJtrt...\n", "style 4 independent iron legs\n", "material Wood\n", "color Octagonal Coffee Table\n", "url https://www.amazon.com/dp/B0BWXB7C1B\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 222, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Karl home Accent Chair Mid-Century Modern Chai...\n", "primary_image https://m.media-amazon.com/images/I/51+a05Mxh+...\n", "style Mid-Century Modern\n", "material NaN\n", "color Beige\n", "url https://www.amazon.com/dp/B0BLP4W97Y\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 223, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Kottova Vanity Mirror with Lights,Makeup Mirro...\n", "primary_image https://m.media-amazon.com/images/I/41Z2VFHxc2...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0BJ1Y5TDN\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 224, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title L.R. Resources Corcovado Metallic Braided Pouf...\n", "primary_image https://m.media-amazon.com/images/I/51QokReEa1...\n", "style Bohemian\n", "material Cotton\n", "color Grey / White\n", "url https://www.amazon.com/dp/B078YDGBM8\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 225, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title GREENSTELL Coat Rack, Wooden Coat Rack Freesta...\n", "primary_image https://m.media-amazon.com/images/I/31lWN-XSfC...\n", "style Rustic\n", "material Wood\n", "color Black\n", "url https://www.amazon.com/dp/B09M8M4P9L\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 226, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title COLLECTIVE HOME Mail Organizer with Mirror, Wa...\n", "primary_image https://m.media-amazon.com/images/I/510ciQYiY4...\n", "style Rustic\n", "material Black\n", "color White\n", "url https://www.amazon.com/dp/B0BWY1HPMB\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 227, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Nightstand with Charging Station and LED Light...\n", "primary_image https://m.media-amazon.com/images/I/41Co0zmXyy...\n", "style With power outlet\n", "material Glass, Engineered Wood\n", "color Black\n", "url https://www.amazon.com/dp/B0C6K8LMG8\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 228, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Kmitmuk 2 Pack Cabinet Towel Holder, White Kit...\n", "primary_image https://m.media-amazon.com/images/I/21b4+99Ox0...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0CGXJ3VR7\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 229, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title GIA Toolix Backless Stool with Metal Seat, Gun...\n", "primary_image https://m.media-amazon.com/images/I/41mgAYeNEx...\n", "style Tapered\n", "material NaN\n", "color Gunmetal\n", "url https://www.amazon.com/dp/B01FL46UD0\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 230, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title It's_Organized Gaming Desk 55 inch PC Computer...\n", "primary_image https://m.media-amazon.com/images/I/41oiXo1q4w...\n", "style Gaming\n", "material Alloy Steel\n", "color Black\n", "url https://www.amazon.com/dp/B08CR34X1X\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 231, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Serta Executive Office Padded Arms, Adjustable...\n", "primary_image https://m.media-amazon.com/images/I/41ZBS1hvHz...\n", "style with-arms\n", "material Foam\n", "color Black/Blue\n", "url https://www.amazon.com/dp/B07644FZVS\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 232, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title KoiHome Wooden Daybed with 2 Storage Drawers, ...\n", "primary_image https://m.media-amazon.com/images/I/511irNkgaw...\n", "style NaN\n", "material NaN\n", "color Espresso\n", "url https://www.amazon.com/dp/B0CHMQC63H\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 233, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Soerreo Shoe Slot Storage Box Adjustable Shoe ...\n", "primary_image https://m.media-amazon.com/images/I/4127YVIANk...\n", "style Modern\n", "material Plastic\n", "color 10 Piece Set\n", "url https://www.amazon.com/dp/B07X5VSLV1\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 234, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Arch Window Wall Mirror for Living Room,White ...\n", "primary_image https://m.media-amazon.com/images/I/419YPa-PWh...\n", "style French Country\n", "material Wood\n", "color Black\n", "url https://www.amazon.com/dp/B0CJV7SF48\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 235, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Jennifer Taylor Home Jacob 18\" Storage Cube Ot...\n", "primary_image https://m.media-amazon.com/images/I/51KOhS-ZWZ...\n", "style Contemporary\n", "material Engineered Wood\n", "color Tan Floral Jacquard\n", "url https://www.amazon.com/dp/B0C9FWFGRP\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 236, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title C COMFORTLAND Unstuffed Faux Leather Ottoman P...\n", "primary_image https://m.media-amazon.com/images/I/51qAukZMUD...\n", "style Modern\n", "material This is an empty shell that you have to stuff.\n", "color Grey3\n", "url https://www.amazon.com/dp/B0BWY5RPD1\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 237, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title ZZQXTC Over Toilet Storage Cabinet, Bathroom S...\n", "primary_image https://m.media-amazon.com/images/I/31cXPz4r76...\n", "style wood\n", "material Wood\n", "color Over the Toilet Storage Cabinet White\n", "url https://www.amazon.com/dp/B0CBDLJ32L\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 238, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title 40ft Upholstery Elastic Webbing,Two Inch (2\") ...\n", "primary_image https://m.media-amazon.com/images/I/51oKu+lxwz...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0CG9CDKQ7\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 239, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Kujielan Oval Wall Mirror with Leaf Decorative...\n", "primary_image https://m.media-amazon.com/images/I/419muJNV1J...\n", "style Contemporary\n", "material Metal\n", "color Black\n", "url https://www.amazon.com/dp/B0CF9W6WW2\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 240, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title RRG Coat Rack Stand, Metal Coat Tree with Heav...\n", "primary_image https://m.media-amazon.com/images/I/214BED2RP6...\n", "style 8 T-shaped Hooks\n", "material Metal\n", "color Gold - T 67\"/170cm\n", "url https://www.amazon.com/dp/B09VBPNY7P\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 241, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Mirrors for Wall Decor, Golden Hanging Mirror ...\n", "primary_image https://m.media-amazon.com/images/I/31TgX2crLU...\n", "style NaN\n", "material Iron\n", "color Gold\n", "url https://www.amazon.com/dp/B097R4M5Y5\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 242, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Mokoze Wavy Mirror Irregular Border 10.24\"x6.3...\n", "primary_image https://m.media-amazon.com/images/I/319OzJXVrx...\n", "style NaN\n", "material Plastic\n", "color White\n", "url https://www.amazon.com/dp/B0C9QHJ611\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 243, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title (100) 12\" Record Outer Sleeves - Outer Reseala...\n", "primary_image https://m.media-amazon.com/images/I/41uJZW57cB...\n", "style NaN\n", "material Vinyl, Plastic, Polypropylene (PP)\n", "color NaN\n", "url https://www.amazon.com/dp/B07B8VT4DC\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 244, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Christopher Knight Home Munro Recliner, Navy B...\n", "primary_image https://m.media-amazon.com/images/I/31exiSJMk8...\n", "style Contemporary\n", "material Foam\n", "color Navy Blue + Teak\n", "url https://www.amazon.com/dp/B09DS1VPFS\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 245, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title 3-Tier Side Table,Narrow End Table with Storag...\n", "primary_image https://m.media-amazon.com/images/I/41tzKL1XIP...\n", "style Modern\n", "material Engineered Wood\n", "color White\n", "url https://www.amazon.com/dp/B0CP732ZN8\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 246, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title DBTHTSK Sofa Latch,Bed Replacement Parts,Heavy...\n", "primary_image https://m.media-amazon.com/images/I/41gQlYHLvc...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0C2GQK6ZD\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 247, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Boraam Sonoma Bench, Storm Gray Wire-Brush\n", "primary_image https://m.media-amazon.com/images/I/316Y4ewyCL...\n", "style NaN\n", "material NaN\n", "color Storm Gray Wire-brush\n", "url https://www.amazon.com/dp/B07T9M8Y88\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 248, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Kwikset BTBCB2Y, Tuscan Bronze\n", "primary_image https://m.media-amazon.com/images/I/21lfjygKja...\n", "style Transitional\n", "material Metal\n", "color Tuscan Bronze\n", "url https://www.amazon.com/dp/B001AHXWQ6\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 249, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Ilyapa 2-Tier Gold Metal Record Player Stand w...\n", "primary_image https://m.media-amazon.com/images/I/4107MgspWh...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0BT6FF83T\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 250, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title GZsenwo (2 Pieces) 3-5/8\" Stainless Steel Repl...\n", "primary_image https://m.media-amazon.com/images/I/41GvGSllzM...\n", "style NaN\n", "material Stainless Steel\n", "color 2pcs\n", "url https://www.amazon.com/dp/B0C6SYFYZN\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 251, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title HomePop by Kinfine Fabric Upholstered Round St...\n", "primary_image https://m.media-amazon.com/images/I/51x3kXXPgx...\n", "style Glam,Farmhouse,Traditional\n", "material Engineered Wood\n", "color Tan Woven\n", "url https://www.amazon.com/dp/B0BG6BJ3DL\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 252, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title EFTILE HOME 2 Foot Stool Handmade Wooden 3 Leg...\n", "primary_image https://m.media-amazon.com/images/I/41-mDeiQw+...\n", "style NaN\n", "material Wood\n", "color Kiwi\n", "url https://www.amazon.com/dp/B0CKJ4YZC9\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 253, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Soft Foot Stool Ottoman Footrest Vanity Stool ...\n", "primary_image https://m.media-amazon.com/images/I/41oTGNme97...\n", "style NaN\n", "material Iron\n", "color Black\n", "url https://www.amazon.com/dp/B0CKW44X29\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 254, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title GAOMON Black 4 Drawer Dresser for Bedroom, Woo...\n", "primary_image https://m.media-amazon.com/images/I/41GkzVqoNy...\n", "style NaN\n", "material NaN\n", "color Black\n", "url https://www.amazon.com/dp/B0CM1B86CJ\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 255, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Alise 24-Inch Bathroom Lavatory Towel Rack Tow...\n", "primary_image https://m.media-amazon.com/images/I/51FqMNM3yY...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0B6HXHQSW\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 256, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Seventable Nightstand with Charging Station an...\n", "primary_image https://m.media-amazon.com/images/I/41Wn14U8Ll...\n", "style Modern\n", "material Engineered Wood\n", "color Black\n", "url https://www.amazon.com/dp/B09DLBNY6W\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 257, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Furinno Coffee Table with Bins, Espresso/Brown...\n", "primary_image https://m.media-amazon.com/images/I/31CY4VJNyx...\n", "style Modern\n", "material Beech,Particle Board\n", "color Espresso/Brown\n", "url https://www.amazon.com/dp/B08C7Y4RB3\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 258, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Mod Made Mid Century Modern Chrome Wire Counte...\n", "primary_image https://m.media-amazon.com/images/I/41BxXleMgG...\n", "style Straight\n", "material NaN\n", "color Black Pad\n", "url https://www.amazon.com/dp/B09Q1ZHQFR\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 259, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Bloomingville 15 Inches Mango Wood and Metal O...\n", "primary_image https://m.media-amazon.com/images/I/21-b0yTRSN...\n", "style Rustic\n", "material Metal\n", "color Black\n", "url https://www.amazon.com/dp/B0CFSPXPYF\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 260, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Gnyonat Accent Chair with Ottoman,Living Room ...\n", "primary_image https://m.media-amazon.com/images/I/41Gau9oSdR...\n", "style NaN\n", "material NaN\n", "color Blue\n", "url https://www.amazon.com/dp/B0C3TYNRJC\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 261, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title SLLFLY Water Bottle Organizer,Stackable Water ...\n", "primary_image https://m.media-amazon.com/images/I/51EAJVwOuL...\n", "style Clear\n", "material NaN\n", "color Clear\n", "url https://www.amazon.com/dp/B0BZNKKCC3\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 262, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title jela Kids Couch Large, Floor Sofa Modular Funi...\n", "primary_image https://m.media-amazon.com/images/I/41Zury7vcH...\n", "style Padded\n", "material Suede\n", "color Charcoal\n", "url https://www.amazon.com/dp/B0BL9CDX29\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 263, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Flexson TV Mount Attachment for Sonos Beam - B...\n", "primary_image https://m.media-amazon.com/images/I/31vbAI-UxE...\n", "style NaN\n", "material NaN\n", "color Black\n", "url https://www.amazon.com/dp/B07DQ6GPK6\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 264, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Small Collapsible Kids Hamper Fold Office Wast...\n", "primary_image https://m.media-amazon.com/images/I/41v-ozvbCq...\n", "style 现代\n", "material Polyester\n", "color 11.8\"*19.7\" Pink\n", "url https://www.amazon.com/dp/B07K2Q2NRC\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 265, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Diyalor 2.6 Gallon Small Trash Can with Handle...\n", "primary_image https://m.media-amazon.com/images/I/219EPmkeeJ...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B09QCMCPYC\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 266, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title DAYTOYS C Shaped End Table-Movable Sofa Table ...\n", "primary_image https://m.media-amazon.com/images/I/41pgntXmHr...\n", "style Classic\n", "material Wood\n", "color Black\n", "url https://www.amazon.com/dp/B0C32RWCV7\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 267, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Phantoscope Storage Ottoman Round15 Inch, Velv...\n", "primary_image https://m.media-amazon.com/images/I/31V7JNrxMg...\n", "style Modern\n", "material Engineered Wood\n", "color Coffee\n", "url https://www.amazon.com/dp/B095HPZ7DD\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 268, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Casual Home Night Owl Nightstand with USB Port...\n", "primary_image https://m.media-amazon.com/images/I/3142Zp+eYu...\n", "style Night Owl\n", "material Walnut,Solid Wood,MDF\n", "color Espresso\n", "url https://www.amazon.com/dp/B019C4PPTU\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 269, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title NOVICA 302212 Handmade Wood and Reverse Painte...\n", "primary_image https://m.media-amazon.com/images/I/51bKwT153n...\n", "style Colonial\n", "material Wood, Glass\n", "color Burgundy\n", "url https://www.amazon.com/dp/B07N41BVDG\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 270, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Toy Storage Basket and Play Mat for Building B...\n", "primary_image https://m.media-amazon.com/images/I/61f83XRzyg...\n", "style NaN\n", "material fabric\n", "color Grey\n", "url https://www.amazon.com/dp/B08PMH8F89\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 271, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title RICOO SQ4965 No-Gap Wall Mount for Samsung® Q7...\n", "primary_image https://m.media-amazon.com/images/I/41VNr1xTfE...\n", "style NaN\n", "material NaN\n", "color black\n", "url https://www.amazon.com/dp/B083WKFRRR\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 272, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Hosley Wooden Frame Mirror 20 Inch High. Ideal...\n", "primary_image https://m.media-amazon.com/images/I/410lp8Rwjv...\n", "style Contemporary\n", "material Wood\n", "color Brown\n", "url https://www.amazon.com/dp/B07BQHWWRW\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 273, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title BRIAN & DANY Foldable Storage Ottoman Footrest...\n", "primary_image https://m.media-amazon.com/images/I/413YS7nQBn...\n", "style Modern\n", "material Wood\n", "color Khaki\n", "url https://www.amazon.com/dp/B08BNDNGHJ\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 274, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title ReplacementScrews Bed Frame Rail Screws Compat...\n", "primary_image https://m.media-amazon.com/images/I/31-vY+TuWO...\n", "style Flat\n", "material Metal\n", "color Multicolored\n", "url https://www.amazon.com/dp/B0CMXYMDH4\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 275, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title mDesign Round Metal in-Lay Accent Table with H...\n", "primary_image https://m.media-amazon.com/images/I/413u0H2o1I...\n", "style Modern\n", "material Steel/Mirror\n", "color Soft Brass/Mirror\n", "url https://www.amazon.com/dp/B08XPR7662\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 276, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title NSFRCLHO Round End Table, Tempered Glass End T...\n", "primary_image https://m.media-amazon.com/images/I/41z8YktAkG...\n", "style Classic\n", "material Tempered Glass\n", "color Black\n", "url https://www.amazon.com/dp/B089YWCTN2\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 277, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title pranovo Metal Sofa Handle Cable Recliner Chair...\n", "primary_image https://m.media-amazon.com/images/I/3144eTNpeE...\n", "style NaN\n", "material Aluminum\n", "color Black\n", "url https://www.amazon.com/dp/B00R5VYYIG\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 278, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Stuffed Animal Storage Bean Bag Chair Cover fo...\n", "primary_image https://m.media-amazon.com/images/I/41dBlMhHTh...\n", "style NaN\n", "material velvet\n", "color Cover Only\n", "url https://www.amazon.com/dp/B08JLH2PVH\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 279, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Pinkpum Shoe Ogranizer for Closet, 12 Pack Sho...\n", "primary_image https://m.media-amazon.com/images/I/41huFJxt+F...\n", "style NaN\n", "material Acrylonitrile Butadiene Styrene\n", "color Clear\n", "url https://www.amazon.com/dp/B0B6P65LGH\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 280, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title BOOSDEN Padded Folding Chair 2 Pack, Foldable ...\n", "primary_image https://m.media-amazon.com/images/I/41H64LdIQ8...\n", "style NaN\n", "material NaN\n", "color 2 Pack Thick Chair | Red\n", "url https://www.amazon.com/dp/B0CC4SZBQ9\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 281, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Kingston Brass SCC8247 Edenscape Pedestal Stee...\n", "primary_image https://m.media-amazon.com/images/I/31FOa-k+Et...\n", "style Modern\n", "material Alloy Steel\n", "color Brushed Brass\n", "url https://www.amazon.com/dp/B0B5VJNZHL\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 282, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Industrial Rolling Bar 3-Tier Kitchen Serving ...\n", "primary_image https://m.media-amazon.com/images/I/51rjiq645t...\n", "style NaN\n", "material Solid Wood,Iron\n", "color Brown+black\n", "url https://www.amazon.com/dp/B07RGDWW5C\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 283, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Chill Sack Bean Bag Chair: Giant 5' Memory Foa...\n", "primary_image https://m.media-amazon.com/images/I/51fQFu92ts...\n", "style Furniture Foam\n", "material NaN\n", "color Microsuede - Lime\n", "url https://www.amazon.com/dp/B00P21TM2O\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 284, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Caroline's Treasures BB5130JMAT Day of The Dea...\n", "primary_image https://m.media-amazon.com/images/I/41Q15C0DMD...\n", "style Day of the Dead Red Flowers Skull\n", "material Rubber\n", "color Day of the Dead Red Flowers Skull\n", "url https://www.amazon.com/dp/B01MR9GSZE\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 285, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title glitzhome Adjustable Bar Stool Set of 2 Swivel...\n", "primary_image https://m.media-amazon.com/images/I/51OPfpn9ov...\n", "style Mid-Century\n", "material NaN\n", "color Begin\n", "url https://www.amazon.com/dp/B08ZC5CYXG\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 286, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Symmons 673TR-STN Identity Wall-Mounted Towel ...\n", "primary_image https://m.media-amazon.com/images/I/31cLgr4MIB...\n", "style Contemporary\n", "material Brass\n", "color Satin Nickel\n", "url https://www.amazon.com/dp/B01LYD3YB1\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 287, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title glitzhome Kitchen Island with Storage Kitchen ...\n", "primary_image https://m.media-amazon.com/images/I/51wSfraUuh...\n", "style Shaker\n", "material Mdf,Metal,Plastic\n", "color Red\n", "url https://www.amazon.com/dp/B09D2T4GP4\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 288, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Lipper International Child's Toy Chest, 33.25\"...\n", "primary_image https://m.media-amazon.com/images/I/41IWlgQ25-...\n", "style NaN\n", "material Engineered Wood, Beechwood, Metal\n", "color Walnut Finish\n", "url https://www.amazon.com/dp/B005H05TWC\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 289, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title dnbss LED Nightstand with Charging Station, Sw...\n", "primary_image https://m.media-amazon.com/images/I/41CANS+MiT...\n", "style Modern\n", "material Wood\n", "color 1-black\n", "url https://www.amazon.com/dp/B0BNWVLYV1\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 290, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Remote Control Holder,TV Remote Caddy/Box with...\n", "primary_image https://m.media-amazon.com/images/I/41p58Tdmyo...\n", "style NaN\n", "material Leather\n", "color Orange\n", "url https://www.amazon.com/dp/B0C2GZNDXF\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 291, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title MoNiBloom Foldable Storage Free Standing Shoes...\n", "primary_image https://m.media-amazon.com/images/I/41SpDKbBsl...\n", "style Modern\n", "material Bamboo\n", "color NaN\n", "url https://www.amazon.com/dp/B09JSR3CYZ\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 292, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Walker Edison Furniture Modern Round Nesting C...\n", "primary_image https://m.media-amazon.com/images/I/51U3y0LRMe...\n", "style Coffee Table\n", "material Manufactured Wood\n", "color Walnut/Gold\n", "url https://www.amazon.com/dp/B072P27BTW\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 293, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Way Basics Book Shelf 4 Cubby Storage (Tool-fr...\n", "primary_image https://m.media-amazon.com/images/I/31eEZQKN+r...\n", "style Modern\n", "material Recycled Material\n", "color NaN\n", "url https://www.amazon.com/dp/B071HWKHQL\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 294, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Mind Reader Trash Can and Toilet Brush Set, Ba...\n", "primary_image https://m.media-amazon.com/images/I/31ktspfOC9...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0BJ7PQ9XH\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 295, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title #4203 Adjustable 1/4\" Threaded Non-Skid Leveli...\n", "primary_image https://m.media-amazon.com/images/I/31Oas3rE7s...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B01M0S28J1\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 296, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Funny Welcome Doormat for Entryway Front Porch...\n", "primary_image https://m.media-amazon.com/images/I/415x2v3cW5...\n", "style Farmhouse\n", "material Rubber\n", "color Colorful,Funny,Novelty,Personalized\n", "url https://www.amazon.com/dp/B09VFPFBND\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 297, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title KINGYES Folding Adjustable Backrest Adirondack...\n", "primary_image https://m.media-amazon.com/images/I/41RnRNOgDD...\n", "style With arms\n", "material NaN\n", "color Grey\n", "url https://www.amazon.com/dp/B0B2JRSBL3\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 298, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Leick Home 10109-GR Oval Condo/Apartment Coffe...\n", "primary_image https://m.media-amazon.com/images/I/31hgF2KPIJ...\n", "style Oval Coffee Table\n", "material Wood\n", "color Smoke Gray\n", "url https://www.amazon.com/dp/B08KLBTL5R\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 299, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Carter's by DaVinci Colby 3-Drawer Dresser in ...\n", "primary_image https://m.media-amazon.com/images/I/31eTOoDK36...\n", "style NaN\n", "material pine, Wood\n", "color Grey\n", "url https://www.amazon.com/dp/B071DZG655\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 300, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Modway Baronet Button-Tufted Vegan Leather Par...\n", "primary_image https://m.media-amazon.com/images/I/31Um2-NPw3...\n", "style Contemporary\n", "material Foam\n", "color Grey\n", "url https://www.amazon.com/dp/B0BR8NVGDL\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 301, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title MOOACE Small Side Table, Round End Table Night...\n", "primary_image https://m.media-amazon.com/images/I/419Yb6N5yy...\n", "style Modern\n", "material Wood\n", "color Brown\n", "url https://www.amazon.com/dp/B0BGL3QXKR\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 302, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title BYOOTIQUE Makeup Chair Folding Camping Stool C...\n", "primary_image https://m.media-amazon.com/images/I/511N0PuE9E...\n", "style NaN\n", "material NaN\n", "color NaN\n", "url https://www.amazon.com/dp/B0CC4X9SS3\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 303, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title nimboo Kids Couch - Modular Kids Play Couch Se...\n", "primary_image https://m.media-amazon.com/images/I/51He1KLeOs...\n", "style NaN\n", "material High Density Comfort Foam\n", "color Rainbow Unicorn\n", "url https://www.amazon.com/dp/B0CLC3XWR6\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 304, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title LOKKHAN Industrial Bar Table 38.6\"-48.4\" Heigh...\n", "primary_image https://m.media-amazon.com/images/I/31uVNZMOnX...\n", "style NaN\n", "material Wood Tabletop,Wooden Tabletop\n", "color Copper\n", "url https://www.amazon.com/dp/B0BVT748HV\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 305, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title UTONE Gaming Chair Computer Chair Breathable F...\n", "primary_image https://m.media-amazon.com/images/I/31dCSKQ14Y...\n", "style Solid Back\n", "material Textile\n", "color Pink\n", "url https://www.amazon.com/dp/B0CF9F4TQD\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 306, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Lexicon Victoria Saddle Wood Bar Stools (Set o...\n", "primary_image https://m.media-amazon.com/images/I/41CPL03Y-W...\n", "style Contemporary\n", "material Wood\n", "color Black Sand\n", "url https://www.amazon.com/dp/B08SLPBC36\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 307, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title ANZORG Behind Door Hanging Kids Shoes Organize...\n", "primary_image https://m.media-amazon.com/images/I/31qQ2tZPv-...\n", "style NaN\n", "material Non Woven Fabric\n", "color 12 Pockets\n", "url https://www.amazon.com/dp/B09KN5ZTXC\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 308, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Pipishell Full-Motion TV Wall Mount for Most 3...\n", "primary_image https://m.media-amazon.com/images/I/41TkLI3K2-...\n", "style NaN\n", "material NaN\n", "color Black\n", "url https://www.amazon.com/dp/B0BN7T57NK\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 309, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Noori Rug Home - Lux Collection Modern Ava Rou...\n", "primary_image https://m.media-amazon.com/images/I/21Uq9uJEE5...\n", "style Glam\n", "material Engineered Wood\n", "color Ivory/Gold Ava\n", "url https://www.amazon.com/dp/B097FC9C27\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 310, dtype: object: 'float' object is not iterable\n", "Error creating embedding for title Modway Parcel Upholstered Fabric Parsons Dinin...\n", "primary_image https://m.media-amazon.com/images/I/41f8WNXejU...\n", "style Modern\n", "material Foam\n", "color Beige\n", "url https://www.amazon.com/dp/B00SMM4H98\n", "keywords NaN\n", "img_description NaN\n", "caption NaN\n", "Name: 311, dtype: object: 'float' object is not iterable\n" ] } ], "source": [ "df_search['embedding'] = df_search.apply(lambda x: embed_tags_caption(x), axis=1)" ] }, { "cell_type": "code", "execution_count": 59, "id": "52241091", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
titleprimary_imagestylematerialcolorurlkeywordsimg_descriptioncaptionembedding
0GOYMFK 1pc Free Standing Shoe Rack, Multi-laye...https://m.media-amazon.com/images/I/416WaLx10j...ModernMetalWhitehttps://www.amazon.com/dp/B0CJHKVG6P['shoe rack', 'metal', 'white', 'multi-layer',...The GOYMFK Free Standing Shoe Rack is a versat...Sleek white multi-layer metal free-standing sh...[-0.06301482, -0.038354326, -0.0108071, -0.015...
1subrtex Leather ding Room, Dining Chairs Set o...https://m.media-amazon.com/images/I/31SejUEWY7...Black Rubber WoodSpongeBlackhttps://www.amazon.com/dp/B0B66QHB23['dining chair', 'leather', 'black']The Subrtex Leather Dining Chairs come in a se...Set of 2 modern black faux leather dining chai...[-0.018292552, -0.006216094, -0.009373649, -0....
2Plant Repotting Mat MUYETOL Waterproof Transpl...https://m.media-amazon.com/images/I/41RgefVq70...ModernPolyethyleneGreenhttps://www.amazon.com/dp/B0BXRTWLYK['repotting mat', 'waterproof', 'portable', 'f...The Plant Repotting Mat is a portable and fold...Vibrant green waterproof plant repotting mat[-0.010247701, 0.0074028056, -0.00037697714, -...
3Pickleball Doormat, Welcome Doormat Absorbent ...https://m.media-amazon.com/images/I/61vz1Igler...ModernRubberA5589https://www.amazon.com/dp/B0C1MRB2M8['doormat', 'absorbent', 'non-slip', 'coconut ...The Pickleball Doormat is a charming welcome m...Coir welcome mat featuring a playful \"It's a g...[-0.0033125042, -0.02689817, -0.009523449, 0.0...
4JOIN IRON Foldable TV Trays for Eating Set of ...https://m.media-amazon.com/images/I/41p4d4VJnN...X Classic StyleIronGrey Set of 4https://www.amazon.com/dp/B0CG1N9QRC['tv tray', 'foldable', 'metal', 'grey']The JOIN IRON Foldable TV Tray Set includes fo...Set of 4 foldable grey TV trays with durable b...[-0.020860892, -0.0053859027, -0.019131333, -0...
\n", "
" ], "text/plain": [ " title \\\n", "0 GOYMFK 1pc Free Standing Shoe Rack, Multi-laye... \n", "1 subrtex Leather ding Room, Dining Chairs Set o... \n", "2 Plant Repotting Mat MUYETOL Waterproof Transpl... \n", "3 Pickleball Doormat, Welcome Doormat Absorbent ... \n", "4 JOIN IRON Foldable TV Trays for Eating Set of ... \n", "\n", " primary_image style \\\n", "0 https://m.media-amazon.com/images/I/416WaLx10j... Modern \n", "1 https://m.media-amazon.com/images/I/31SejUEWY7... Black Rubber Wood \n", "2 https://m.media-amazon.com/images/I/41RgefVq70... Modern \n", "3 https://m.media-amazon.com/images/I/61vz1Igler... Modern \n", "4 https://m.media-amazon.com/images/I/41p4d4VJnN... X Classic Style \n", "\n", " material color url \\\n", "0 Metal White https://www.amazon.com/dp/B0CJHKVG6P \n", "1 Sponge Black https://www.amazon.com/dp/B0B66QHB23 \n", "2 Polyethylene Green https://www.amazon.com/dp/B0BXRTWLYK \n", "3 Rubber A5589 https://www.amazon.com/dp/B0C1MRB2M8 \n", "4 Iron Grey Set of 4 https://www.amazon.com/dp/B0CG1N9QRC \n", "\n", " keywords \\\n", "0 ['shoe rack', 'metal', 'white', 'multi-layer',... \n", "1 ['dining chair', 'leather', 'black'] \n", "2 ['repotting mat', 'waterproof', 'portable', 'f... \n", "3 ['doormat', 'absorbent', 'non-slip', 'coconut ... \n", "4 ['tv tray', 'foldable', 'metal', 'grey'] \n", "\n", " img_description \\\n", "0 The GOYMFK Free Standing Shoe Rack is a versat... \n", "1 The Subrtex Leather Dining Chairs come in a se... \n", "2 The Plant Repotting Mat is a portable and fold... \n", "3 The Pickleball Doormat is a charming welcome m... \n", "4 The JOIN IRON Foldable TV Tray Set includes fo... \n", "\n", " caption \\\n", "0 Sleek white multi-layer metal free-standing sh... \n", "1 Set of 2 modern black faux leather dining chai... \n", "2 Vibrant green waterproof plant repotting mat \n", "3 Coir welcome mat featuring a playful \"It's a g... \n", "4 Set of 4 foldable grey TV trays with durable b... \n", "\n", " embedding \n", "0 [-0.06301482, -0.038354326, -0.0108071, -0.015... \n", "1 [-0.018292552, -0.006216094, -0.009373649, -0.... \n", "2 [-0.010247701, 0.0074028056, -0.00037697714, -... \n", "3 [-0.0033125042, -0.02689817, -0.009523449, 0.0... \n", "4 [-0.020860892, -0.0053859027, -0.019131333, -0... " ] }, "execution_count": 59, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_search.head()" ] }, { "cell_type": "code", "execution_count": 60, "id": "f4a3558f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(50, 10)\n" ] } ], "source": [ "# Keep only the lines where we have embeddings\n", "df_search = df_search.dropna(subset=['embedding'])\n", "print(df_search.shape)" ] }, { "cell_type": "code", "execution_count": 61, "id": "5cc4352b", "metadata": {}, "outputs": [], "source": [ "data_embeddings_path = \"data/items_tagged_and_captioned_embeddings.csv\"" ] }, { "cell_type": "code", "execution_count": 62, "id": "5d0bc2df", "metadata": {}, "outputs": [], "source": [ "# Saving locally for later - optional: do not execute if you prefer to use the provided file\n", "df_search.to_csv(data_embeddings_path, index=False)" ] }, { "cell_type": "code", "execution_count": 63, "id": "1794c6fb", "metadata": {}, "outputs": [], "source": [ "# Optional: load data from saved file if you haven't processed the whole dataset\n", "from ast import literal_eval\n", "df_search = pd.read_csv(data_embeddings_path)\n", "df_search[\"embedding\"] = df_search.embedding.apply(literal_eval).apply(np.array)" ] }, { "cell_type": "markdown", "id": "c255a1bc", "metadata": {}, "source": [ "### Search from input text \n", "\n", "We can compare the input text from a user directly to the embeddings we just created." ] }, { "cell_type": "code", "execution_count": 64, "id": "1c957f85", "metadata": {}, "outputs": [], "source": [ "# Searching for N most similar results\n", "def search_from_input_text(query, n = 2):\n", " embedded_value = get_embedding(query)\n", " df_search['similarity'] = df_search['embedding'].apply(lambda x: cosine_similarity(np.array(x).reshape(1,-1), np.array(embedded_value).reshape(1, -1)))\n", " most_similar = df_search.sort_values('similarity', ascending=False).iloc[:n]\n", " return most_similar" ] }, { "cell_type": "code", "execution_count": 65, "id": "94d48746", "metadata": {}, "outputs": [], "source": [ "user_inputs = ['shoe storage', 'black metal side table', 'doormat', 'step bookshelf', 'ottoman']" ] }, { "cell_type": "code", "execution_count": 66, "id": "828e6adf", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Input: shoe storage\n", "\n", "GOYMFK 1pc Free Standing Shoe Rack, Multi-layer Me... (https://www.amazon.com/dp/B0CJHKVG6P) - Similarity: 0.57\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "MAEPA RV Shoe Storage for Bedside - 8 Extra Large ... (https://www.amazon.com/dp/B0C4PL1R3F) - Similarity: 0.55\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "Input: black metal side table\n", "\n", "FLYJOE Narrow Side Table with PU Leather Magazine ... (https://www.amazon.com/dp/B0CHYDTQKN) - Similarity: 0.58\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "HomePop Metal Accent Table Triangle Base Round Mir... (https://www.amazon.com/dp/B08N5H868H) - Similarity: 0.57\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "Input: doormat\n", "\n", "GXFC ZHAO Welcome Funny Door Mat Shoes and Bras Of... (https://www.amazon.com/dp/B07X61R7N8) - Similarity: 0.52\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "Pickleball Doormat, Welcome Doormat Absorbent Non-... (https://www.amazon.com/dp/B0C1MRB2M8) - Similarity: 0.49\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "Input: step bookshelf\n", "\n", "Leick Home 70007-WTGD Mixed Metal and Wood Stepped... (https://www.amazon.com/dp/B098KNRNLQ) - Similarity: 0.57\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "Wildkin Kids Canvas Sling Bookshelf with Storage f... (https://www.amazon.com/dp/B07GBVFZ1Y) - Similarity: 0.46\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "Input: ottoman\n", "\n", "Moroccan Leather Pouf Ottoman for Living Room - Ro... (https://www.amazon.com/dp/B0CP45784G) - Similarity: 0.49\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "HomePop Home Decor | K2380-YDQY-2 | Luxury Large F... (https://www.amazon.com/dp/B0B94T1TZ1) - Similarity: 0.46\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n" ] } ], "source": [ "for i in user_inputs:\n", " print(f\"Input: {i}\\n\")\n", " res = search_from_input_text(i)\n", " for index, row in res.iterrows():\n", " similarity_score = row['similarity']\n", " if isinstance(similarity_score, np.ndarray):\n", " similarity_score = similarity_score[0][0]\n", " print(f\"{row['title'][:50]}{'...' if len(row['title']) > 50 else ''} ({row['url']}) - Similarity: {similarity_score:.2f}\")\n", " img = Image(url=row['primary_image'])\n", " display(img)\n", " print(\"\\n\\n\")" ] }, { "cell_type": "markdown", "id": "13d20f4d", "metadata": {}, "source": [ "### Search from image\n", "\n", "If the input is an image, we can find similar images by first turning images into captions, and embedding those captions to compare them to the already created embeddings." ] }, { "cell_type": "code", "execution_count": 67, "id": "bdae7409", "metadata": {}, "outputs": [], "source": [ "# We'll take a mix of images: some we haven't seen and some that are already in the dataset\n", "example_images = df.iloc[306:]['primary_image'].to_list() + df.iloc[5:10]['primary_image'].to_list()" ] }, { "cell_type": "code", "execution_count": 68, "id": "78845a30", "metadata": { "scrolled": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Input: \n", "\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "Black Leather Office Chair Mid Back Leather Desk C... (https://www.amazon.com/dp/B0BVQSPCCF) - Similarity: 0.54\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "Input: \n", "\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "subrtex Leather ding Room, Dining Chairs Set of 2,... (https://www.amazon.com/dp/B0B66QHB23) - Similarity: 0.52\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "Input: \n", "\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "MAEPA RV Shoe Storage for Bedside - 8 Extra Large ... (https://www.amazon.com/dp/B0C4PL1R3F) - Similarity: 0.65\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "Input: \n", "\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "Chief Mfg.Swing-Arm Wall Mount Hardware Mount Blac... (https://www.amazon.com/dp/B007E40Z5K) - Similarity: 0.66\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "Input: \n", "\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "Homebeez 39.1\" Length Bedroom Storage Bench, End B... (https://www.amazon.com/dp/B0BWQ8M4Q3) - Similarity: 0.52\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "Input: \n", "\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "subrtex Leather ding Room, Dining Chairs Set of 2,... (https://www.amazon.com/dp/B0B66QHB23) - Similarity: 0.51\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "Input: \n", "\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "LOVMOR 30'' Bathroom Vanity Sink Base Cabine, Stor... (https://www.amazon.com/dp/B0C9WYYFLB) - Similarity: 0.58\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "Input: \n", "\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "Folews Bathroom Organizer Over The Toilet Storage,... (https://www.amazon.com/dp/B09NZY3R1T) - Similarity: 0.73\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "Input: \n", "\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "GOYMFK 1pc Free Standing Shoe Rack, Multi-layer Me... (https://www.amazon.com/dp/B0CJHKVG6P) - Similarity: 0.72\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "Input: \n", "\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "subrtex Leather ding Room, Dining Chairs Set of 2,... (https://www.amazon.com/dp/B0B66QHB23) - Similarity: 0.77\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n", "Input: \n", "\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "Plant Repotting Mat MUYETOL Waterproof Transplanti... (https://www.amazon.com/dp/B0BXRTWLYK) - Similarity: 0.64\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "\n" ] } ], "source": [ "for i in example_images:\n", " img_description = describe_image(i, '')\n", " caption = caption_image(img_description)\n", " img = Image(url=i)\n", " print('Input: \\n')\n", " display(img)\n", " res = search_from_input_text(caption, 1).iloc[0]\n", " similarity_score = res['similarity']\n", " if isinstance(similarity_score, np.ndarray):\n", " similarity_score = similarity_score[0][0]\n", " print(f\"{res['title'][:50]}{'...' if len(res['title']) > 50 else ''} ({res['url']}) - Similarity: {similarity_score:.2f}\")\n", " img_res = Image(url=res['primary_image'])\n", " display(img_res)\n", " print(\"\\n\\n\")\n", " " ] }, { "cell_type": "markdown", "id": "8f3f316d", "metadata": {}, "source": [ "## Wrapping up\n", "\n", "\n", "In this notebook, we explored how to leverage the multimodal capabilities of `gpt-4o-mini` to tag and caption images. By providing images along with contextual information to the model, we were able to generate tags and descriptions that can be further refined to create captions. This process has practical applications in various scenarios, particularly in enhancing search functionalities.\n", "\n", "The search use case illustrated can be directly applied to applications such as recommendation systems, but the techniques covered in this notebook can be extended beyond items search and used in multiple use cases, for example RAG applications leveraging unstructured image data.\n", "\n", "As a next step, you could explore using a combination of rule-based filtering with keywords and embeddings search with captions to retrieve more relevant results." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.9" } }, "nbformat": 4, "nbformat_minor": 5 }