{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "-XMbnEGCHFok", "outputId": "f37341ff-c0e6-4631-c748-9d6d747d4c5e" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m314.1/314.1 kB\u001b[0m \u001b[31m3.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.6/75.6 kB\u001b[0m \u001b[31m6.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m77.9/77.9 kB\u001b[0m \u001b[31m4.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m4.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.3/12.3 MB\u001b[0m \u001b[31m23.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m92.0/92.0 kB\u001b[0m \u001b[31m6.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m314.6/314.6 kB\u001b[0m \u001b[31m26.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m142.5/142.5 kB\u001b[0m \u001b[31m5.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m8.7/8.7 MB\u001b[0m \u001b[31m52.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m47.2/47.2 kB\u001b[0m \u001b[31m5.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m60.8/60.8 kB\u001b[0m \u001b[31m6.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m129.9/129.9 kB\u001b[0m \u001b[31m12.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m71.9/71.9 kB\u001b[0m \u001b[31m6.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m53.2/53.2 kB\u001b[0m \u001b[31m5.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m307.7/307.7 kB\u001b[0m \u001b[31m26.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m341.4/341.4 kB\u001b[0m \u001b[31m33.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.4/3.4 MB\u001b[0m \u001b[31m58.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m60.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25h Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n", "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", "spacy 3.7.4 requires typer<0.10.0,>=0.3.0, but you have typer 0.12.3 which is incompatible.\n", "weasel 0.3.4 requires typer<0.10.0,>=0.3.0, but you have typer 0.12.3 which is incompatible.\u001b[0m\u001b[31m\n", "\u001b[0m" ] } ], "source": [ "# Install OpenAI library\n", "!pip install -U -q openai tenacity\n", "!pip install -q gradio" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 493 }, "id": "bg7ibHP5ngZy", "outputId": "e38566fc-c9a1-4f44-c770-5180cb799921" }, "outputs": [ { "data": { "application/vnd.google.colaboratory.intrinsic+json": { "summary": "{\n \"name\": \"df\",\n \"rows\": 3,\n \"fields\": [\n {\n \"column\": \"Model Number\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"Honeywell VC10 Aeromax Elite Cordless Vacuum Cleaner\",\n \"Honeywell VC14 Aeromax Elite Cordless Vacuum Cleaner\",\n \"Honeywell VC16 Cordless Vacuum Cleaner\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Product Design\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 2,\n \"samples\": [\n \"New Design\",\n \"Off-the-shelf\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Price\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 143.64307617610166,\n \"min\": 379.95,\n \"max\": 649.95,\n \"num_unique_values\": 3,\n \"samples\": [\n 379.95,\n 649.95\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Power\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 125,\n \"min\": 400,\n \"max\": 630,\n \"num_unique_values\": 3,\n \"samples\": [\n 400,\n 630\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Filter\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"HEPA+Sponge\",\n \"HEPA 13\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Air Watts Suction\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 48,\n \"min\": 125,\n \"max\": 220,\n \"num_unique_values\": 3,\n \"samples\": [\n 125,\n 220\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Charging Time\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1.4433756729740643,\n \"min\": 2.0,\n \"max\": 4.5,\n \"num_unique_values\": 2,\n \"samples\": [\n 2.0,\n 4.5\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Noise Level\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 2,\n \"min\": 81,\n \"max\": 85,\n \"num_unique_values\": 3,\n \"samples\": [\n 85,\n 81\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Weight\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.15534906930308046,\n \"min\": 2.7,\n \"max\": 3.0,\n \"num_unique_values\": 3,\n \"samples\": [\n 2.7,\n 2.92\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Dimensions\",\n \"properties\": {\n \"dtype\": \"object\",\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Accessories and Tools\",\n \"properties\": {\n \"dtype\": \"object\",\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Running Time\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 17,\n \"min\": 60,\n \"max\": 90,\n \"num_unique_values\": 2,\n \"samples\": [\n 90,\n 60\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Description\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"The Honeywell VC10 AEROMAX ELITE is a lightweight cordless vacuum offering powerful 125 air-watt suction\\n with its advanced digital motor. This vacuum includes eight tools, a tangle-resistant design,\\n and LED lights on the roller for clear and enjoyable cleaning. Its dual-cyclonic filtration ensures consistent suction,\\n while the ergonomic design promotes wrist comfort. With up to 55 minutes of runtime from the high-capacity battery,\\n Easy One-Touch Control for settings, a quick dustbin emptying mechanism, a wall mount dock, and a deluxe pet hair brush,\\n it's an ideal choice, especially for pet owners. Upgrade your cleaning with the VC10 AEROMAX ELITE.\\n \",\n \"The Honeywell VC14 AEROMAX ELITE Cordless Vacuum offers superior 220 air-watt suction with its 630W digital motor.\\n This lightweight handheld vacuum includes ten tools for comprehensive cleaning.\\n Features include a tangle-resistant design, LED lights on the roller,\\n and a dual pro high-efficiency filter system for effective dust separation.\\n It's ergonomically designed for wrist comfort and boasts a high-capacity battery with 70 minutes of run time.\\n A fast-charging premium charger, advanced LED display for settings adjustments, smart auto clean mode,\\n easy one-press disposal, and washable dust tank enhance usability.\\n The package also includes a wall mount docking station and a deluxe pet hair removal brush.\\n \"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"URL\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 3,\n \"samples\": [\n \"https://honeywellvac.com/products/vc10-aeromax-elite\",\n \"https://honeywellvac.com/products/vc14\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}", "type": "dataframe", "variable_name": "df" }, "text/html": [ "\n", "
\n", " | Model Number | \n", "Product Design | \n", "Price | \n", "Power | \n", "Filter | \n", "Air Watts Suction | \n", "Charging Time | \n", "Noise Level | \n", "Weight | \n", "Dimensions | \n", "Accessories and Tools | \n", "Running Time | \n", "Description | \n", "URL | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "Honeywell VC10 Aeromax Elite Cordless Vacuum C... | \n", "Off-the-shelf | \n", "379.95 | \n", "400 | \n", "HEPA+Sponge | \n", "125 | \n", "4.5 | \n", "85 | \n", "2.70 | \n", "{'width': 230, 'depth': 257, 'height': 1170} | \n", "[Cleaner head with Tangle Resistant Hair Desig... | \n", "60 | \n", "The Honeywell VC10 AEROMAX ELITE is a lightwei... | \n", "https://honeywellvac.com/products/vc10-aeromax... | \n", "
1 | \n", "Honeywell VC14 Aeromax Elite Cordless Vacuum C... | \n", "Off-the-shelf | \n", "649.95 | \n", "630 | \n", "HEPA 13 | \n", "220 | \n", "2.0 | \n", "81 | \n", "2.92 | \n", "{'width': 255, 'depth': 278, 'height': 1190} | \n", "[Tangle-Resistant Motorized Carpet Roller with... | \n", "90 | \n", "The Honeywell VC14 AEROMAX ELITE Cordless Vacu... | \n", "https://honeywellvac.com/products/vc14 | \n", "
2 | \n", "Honeywell VC16 Cordless Vacuum Cleaner | \n", "New Design | \n", "599.95 | \n", "600 | \n", "HEPA | \n", "185 | \n", "4.5 | \n", "83 | \n", "3.00 | \n", "{'width': 250, 'depth': 251, 'height': 1120} | \n", "[Carpet Floor Nozzle, EZ-Change Soft Roller, D... | \n", "60 | \n", "The Honeywell VC16 AEROMAX PRO is a lightweigh... | \n", "https://honeywellvac.com/products/vc16-aeromax... | \n", "