Merge branch 'ed-donner:main' into main
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 1,
|
"execution_count": null,
|
||||||
"id": "c1070317-3ed9-4659-abe3-828943230e03",
|
"id": "c1070317-3ed9-4659-abe3-828943230e03",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 2,
|
"execution_count": null,
|
||||||
"id": "4a456906-915a-4bfd-bb9d-57e505c5093f",
|
"id": "4a456906-915a-4bfd-bb9d-57e505c5093f",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 3,
|
"execution_count": null,
|
||||||
"id": "a8d7923c-5f28-4c30-8556-342d7c8497c1",
|
"id": "a8d7923c-5f28-4c30-8556-342d7c8497c1",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -65,42 +65,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 4,
|
"execution_count": null,
|
||||||
"id": "6f448d69-3cec-4915-8697-f1046ba23e4a",
|
"id": "6f448d69-3cec-4915-8697-f1046ba23e4a",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/markdown": [
|
|
||||||
"To find the speed of Alex, we need to use the formula:\n",
|
|
||||||
"\n",
|
|
||||||
"Speed = Distance / Time\n",
|
|
||||||
"\n",
|
|
||||||
"We know the distance (3 kms) and the time it took for the journey (2 hours).\n",
|
|
||||||
"\n",
|
|
||||||
"First, let's convert the distance from kilometers to meters: 1 km = 1000 meters, so:\n",
|
|
||||||
"Distance (in meters) = 3 km × 1000 m/km = 3000 meters\n",
|
|
||||||
"\n",
|
|
||||||
"Now we can plug in the values:\n",
|
|
||||||
"\n",
|
|
||||||
"Speed = Distance / Time\n",
|
|
||||||
"= 3000 meters / 2 hours\n",
|
|
||||||
"= 1500 meters-per-hour\n",
|
|
||||||
"\n",
|
|
||||||
"To make it more readable, let's convert this to kilometers per hour (km/h):\n",
|
|
||||||
"1 meter = 0.001 km (to convert meters to kilometers), so:\n",
|
|
||||||
"= 1500 m ÷ 1000 = 1.5 km\n",
|
|
||||||
"\n",
|
|
||||||
"Therefore, Alex's speed is 1.5 kilometers per hour."
|
|
||||||
],
|
|
||||||
"text/plain": [
|
|
||||||
"<IPython.core.display.Markdown object>"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "display_data"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"# Task 1: Tight Speed\n",
|
"# Task 1: Tight Speed\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -113,64 +81,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 5,
|
"execution_count": null,
|
||||||
"id": "3f0d0137-52b0-47a8-81a8-11a90a010798",
|
"id": "3f0d0137-52b0-47a8-81a8-11a90a010798",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/markdown": [
|
|
||||||
"Traveling around the world is an exciting adventure! To help you minimize your travel time, I'll provide a general outline of the most efficient way to cover all continents and major cities.\n",
|
|
||||||
"\n",
|
|
||||||
"**The Most Efficient Route:**\n",
|
|
||||||
"\n",
|
|
||||||
"1. Start from North America (USA or Canada) and head east:\n",
|
|
||||||
"\t* Fly from Los Angeles to Dubai\n",
|
|
||||||
"\t* From Dubai, take a Middle Eastern flight to Istanbul, Turkey\n",
|
|
||||||
"2. Next, enter Europe by flying back west from Istanbul:\n",
|
|
||||||
"\t* Take trains and buses between major European cities like Berlin, Prague, Vienna, etc.\n",
|
|
||||||
"3. Head south into Asia:\n",
|
|
||||||
"\t* From Eastern Europe, fly to Delhi or Mumbai in India\n",
|
|
||||||
"\t* Then, take flights to Southeast Asian countries like Bangkok (Thailand), Jakarta (Indonesia), or Kuala Lumpur (Malaysia)\n",
|
|
||||||
"4. Cross into Africa and visit major cities:\n",
|
|
||||||
"\t* Fly from Southeast Asia to Cairo, Egypt\n",
|
|
||||||
"\t* Explore North African countries like Morocco, Tunisia, and Algeria\n",
|
|
||||||
"5. From Africa, head north into Europe again:\n",
|
|
||||||
"\t* Fly back to Western European countries like London (UK), Paris (France), or Amsterdam (Netherlands)\n",
|
|
||||||
"6. Finally, enter South America from Europe:\n",
|
|
||||||
"\t* Take flights from European cities to Buenos Aires (Argentina) or Rio de Janeiro (Brazil)\n",
|
|
||||||
"\n",
|
|
||||||
"**Tips and Considerations:**\n",
|
|
||||||
"\n",
|
|
||||||
"1. **Fly through major hubs:** Using airports like Dubai, Istanbul, Cairo, Bangkok, and Singapore will simplify your journey.\n",
|
|
||||||
"2. **Choose efficient airlines:** Look for ultra-low-cost carriers, budget airlines, or hybrid models that offer competitive prices.\n",
|
|
||||||
"3. **Plan smart connections:** Research flight schedules, layovers, and travel restrictions to minimize delays.\n",
|
|
||||||
"4. **Use visa-free policies:** Make the most of visa exemptions where possible, like e-Visas for India, Mexico, and some African countries.\n",
|
|
||||||
"5. **Health insurance:** Check if your travel insurance covers medical care abroad.\n",
|
|
||||||
"\n",
|
|
||||||
"**Time Estimates:**\n",
|
|
||||||
"\n",
|
|
||||||
"* Assuming a moderate pace (some planning, but no frills), you can cover around 10-15 major cities in 2-3 months with decent connections and layovers.\n",
|
|
||||||
"* However, this pace is dependent on your personal interests, budget, and flexibility. Be prepared to adjust based on changing circumstances or unexpected delays.\n",
|
|
||||||
"\n",
|
|
||||||
"**Additional Tips:**\n",
|
|
||||||
"\n",
|
|
||||||
"1. Consider the weather, peak tourist seasons, and holidays when planning your trip.\n",
|
|
||||||
"2. Bring essential documents like passports, visas (if required), travel insurance, and health certificates.\n",
|
|
||||||
"3. Research local regulations, COVID-19 guidelines, and vaccinations before traveling to specific countries.\n",
|
|
||||||
"\n",
|
|
||||||
"Keep in mind that this outline is a general suggestion, and actual times will vary depending on your start date, flight options, visa processing, and additional activities (like snorkeling or hiking) you'd like to incorporate.\n",
|
|
||||||
"\n",
|
|
||||||
"Is there anything else I can help with?"
|
|
||||||
],
|
|
||||||
"text/plain": [
|
|
||||||
"<IPython.core.display.Markdown object>"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "display_data"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"# Task 2: Travel the world in X days?\n",
|
"# Task 2: Travel the world in X days?\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -183,102 +97,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 27,
|
"execution_count": null,
|
||||||
"id": "60ce7000-a4a5-4cce-a261-e75ef45063b4",
|
"id": "60ce7000-a4a5-4cce-a261-e75ef45063b4",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"Here's an example implementation using Python with the `requests` library to fetch the webpage content and `BeautifulSoup` for HTML parsing.\n",
|
|
||||||
"\n",
|
|
||||||
"### Install Required Libraries\n",
|
|
||||||
"```bash\n",
|
|
||||||
"pip install requests beautifulsoup4\n",
|
|
||||||
"```\n",
|
|
||||||
"\n",
|
|
||||||
"### Code Implementation\n",
|
|
||||||
"\n",
|
|
||||||
"```python\n",
|
|
||||||
"import requests\n",
|
|
||||||
"from bs4 import BeautifulSoup\n",
|
|
||||||
"\n",
|
|
||||||
"def get_webpage_content(url):\n",
|
|
||||||
" \"\"\"\n",
|
|
||||||
" Fetches the contents of a website.\n",
|
|
||||||
" \n",
|
|
||||||
" Args:\n",
|
|
||||||
" url (str): URL of the webpage.\n",
|
|
||||||
" \n",
|
|
||||||
" Returns:\n",
|
|
||||||
" str: HTML content of the webpage.\n",
|
|
||||||
" \"\"\"\n",
|
|
||||||
" try:\n",
|
|
||||||
" response = requests.get(url)\n",
|
|
||||||
" response.raise_for_status() # Raise an exception for HTTP errors\n",
|
|
||||||
" return response.text\n",
|
|
||||||
" except requests.exceptions.RequestException as e:\n",
|
|
||||||
" print(f\"Error fetching webpage: {e}\")\n",
|
|
||||||
" return None\n",
|
|
||||||
"\n",
|
|
||||||
"def parse_links(html_content, base_url=\"\"):\n",
|
|
||||||
" \"\"\"\n",
|
|
||||||
" Parses links from a given HTML content.\n",
|
|
||||||
" \n",
|
|
||||||
" Args:\n",
|
|
||||||
" html_content (str): HTML content of the webpage.\n",
|
|
||||||
" base_url (str): Base URL to construct relative link URLs. Defaults to \"\".\n",
|
|
||||||
" \n",
|
|
||||||
" Returns:\n",
|
|
||||||
" list: List of extracted URLs.\n",
|
|
||||||
" \"\"\"\n",
|
|
||||||
" soup = BeautifulSoup(html_content, 'html.parser')\n",
|
|
||||||
" links = []\n",
|
|
||||||
"\n",
|
|
||||||
" for tag in soup.find_all('a'):\n",
|
|
||||||
" href = tag.get('href')\n",
|
|
||||||
"\n",
|
|
||||||
" # Handle absolute and relative URLs\n",
|
|
||||||
" if not href or href.startswith('/'):\n",
|
|
||||||
" url = \"\"\n",
|
|
||||||
" else:\n",
|
|
||||||
" if base_url:\n",
|
|
||||||
" url = f\"{base_url}{href}\"\n",
|
|
||||||
" else:\n",
|
|
||||||
" url = href\n",
|
|
||||||
"\n",
|
|
||||||
" links.append(url)\n",
|
|
||||||
"\n",
|
|
||||||
" return links\n",
|
|
||||||
"\n",
|
|
||||||
"# Example usage\n",
|
|
||||||
"url = \"http://www.example.com\"\n",
|
|
||||||
"html_content = get_webpage_content(url)\n",
|
|
||||||
"links = parse_links(html_content, url)\n",
|
|
||||||
"\n",
|
|
||||||
"print(\"Extracted Links:\")\n",
|
|
||||||
"for link in links:\n",
|
|
||||||
" print(link)\n",
|
|
||||||
"```\n",
|
|
||||||
"\n",
|
|
||||||
"### How It Works\n",
|
|
||||||
"\n",
|
|
||||||
"1. `get_webpage_content` function takes a URL as input and fetches the corresponding webpage using `requests.get()`. It raises exceptions for HTTP errors.\n",
|
|
||||||
"2. `parse_links` function analyzes the provided HTML content to find all `<a>` tags, extracts their `href` attributes, and constructs URLs by appending relative paths to a base URL (if specified).\n",
|
|
||||||
"3. If you want to inspect the behavior of this code with your own inputs, use the example usage above as reference.\n",
|
|
||||||
"\n",
|
|
||||||
"### Commit Message\n",
|
|
||||||
"```markdown\n",
|
|
||||||
"feat: add functions for URL fetching & HTML link parsing\n",
|
|
||||||
"\n",
|
|
||||||
"Description: Provides two main Python functions, `get_webpage_content` and `parse_links`, leveraging `requests` and `BeautifulSoup` respectively.\n",
|
|
||||||
"```\n",
|
|
||||||
"\n",
|
|
||||||
"Please feel free to ask me any questions or need further clarification.\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"# Task 3: Generate Code for task 4 to scrap some webpages\n",
|
"# Task 3: Generate Code for task 4 to scrap some webpages\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -291,7 +113,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 6,
|
"execution_count": null,
|
||||||
"id": "8f7c8ea8-4082-4ad0-8751-3301adcf6538",
|
"id": "8f7c8ea8-4082-4ad0-8751-3301adcf6538",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -353,105 +175,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 7,
|
"execution_count": null,
|
||||||
"id": "77286a37-7d34-44f0-bbab-abd1d33b21b3",
|
"id": "77286a37-7d34-44f0-bbab-abd1d33b21b3",
|
||||||
"metadata": {},
|
"metadata": {
|
||||||
"outputs": [
|
"scrolled": true
|
||||||
{
|
},
|
||||||
"name": "stdout",
|
"outputs": [],
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"Extracted Links:\n",
|
|
||||||
"https://endpoints.huggingface.co\n",
|
|
||||||
"https://apply.workable.com/huggingface/\n",
|
|
||||||
"https://discuss.huggingface.co\n",
|
|
||||||
"https://status.huggingface.co/\n",
|
|
||||||
"https://github.com/huggingface\n",
|
|
||||||
"https://twitter.com/huggingface\n",
|
|
||||||
"https://www.linkedin.com/company/huggingface/\n"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/markdown": [
|
|
||||||
"Here's a possible brochure design and content based on the code snippet provided:\n",
|
|
||||||
"\n",
|
|
||||||
"**[Cover Page]**\n",
|
|
||||||
"\n",
|
|
||||||
"* Title: Hugging Face\n",
|
|
||||||
"* Tagline: Building sustainable AI models for everyone\n",
|
|
||||||
"* Background image: A gradient background with a collage of diverse images, likely representing people from different cultures and backgrounds working together.\n",
|
|
||||||
"\n",
|
|
||||||
"**[Inside Pages]**\n",
|
|
||||||
"\n",
|
|
||||||
"**[Page 1: About Us]**\n",
|
|
||||||
"\n",
|
|
||||||
"* Headline: Discover the Power of AI Models on Hugging Face\n",
|
|
||||||
"* Text: Hugging Face is a leading open-source platform for natural language processing (NLP) models. Our mission is to empower researchers, developers, and businesses to build and use high-quality AI models that can be applied in various industries.\n",
|
|
||||||
"* Image: A group photo of the Hugging Face team\n",
|
|
||||||
"\n",
|
|
||||||
"**[Page 2: Models]**\n",
|
|
||||||
"\n",
|
|
||||||
"* Headline: Explore the Largest Collection of Pre-Trained NLP Models\n",
|
|
||||||
"* Text: Our model portal offers over 200 pre-trained models, covering a wide range of tasks such as sentiment analysis, entity recognition, and language translation.\n",
|
|
||||||
"* Features:\n",
|
|
||||||
" + Model browsing by task or dataset\n",
|
|
||||||
" + Filtering by accuracy, accuracy distribution, weights, and more\n",
|
|
||||||
"\t+ Training from scratch options for advanced users\n",
|
|
||||||
"* Image: A screenshot of the model portal with a random selection of models\n",
|
|
||||||
"\n",
|
|
||||||
"**[Page 3: Datasets]**\n",
|
|
||||||
"\n",
|
|
||||||
"* Headline: Tap into a Universe of High-Quality Datasets for Model Training\n",
|
|
||||||
"* Text: Hugging Face's dataset repository includes over 1 million datasets, covering various domains such as text analysis, speech recognition, and sentiment analysis.\n",
|
|
||||||
"* Features:\n",
|
|
||||||
" + Dataset browsing by domain or type\n",
|
|
||||||
" + Filtering by size, download time, license, and more\n",
|
|
||||||
"\t+ Data augmentation options\n",
|
|
||||||
"* Image: A screenshot of the dataset repository with a random selection of datasets\n",
|
|
||||||
"\n",
|
|
||||||
"**[Page 4: Spaces]**\n",
|
|
||||||
"\n",
|
|
||||||
"* Headline: Collaborate on Research Projects and Share Models\n",
|
|
||||||
"* Text: Our shared model hosting platform allows researchers to collaborate on open-source projects, share models, and receive feedback from community members.\n",
|
|
||||||
"* Features:\n",
|
|
||||||
" + Project creation options for collaboration\n",
|
|
||||||
"\t+ Model sharing and download\n",
|
|
||||||
"\t+ Discussion forums for feedback and support\n",
|
|
||||||
"* Image: A screenshot of the spaces dashboard with a selected project\n",
|
|
||||||
"\n",
|
|
||||||
"**[Page 5: Changelog]**\n",
|
|
||||||
"\n",
|
|
||||||
"* Headline: Stay Up-to-Date on the Latest Hugging Face Features\n",
|
|
||||||
"* Text: Get notified about new model releases, dataset updates, and feature enhancements through our changelog.\n",
|
|
||||||
"* Format:\n",
|
|
||||||
"\t+ List of recent features and bug fixes with brief descriptions\n",
|
|
||||||
"\t+ Links to documentation or demo models for some features\n",
|
|
||||||
"\t+ Option to subscribe to notifications via email\n",
|
|
||||||
"* Image: A screenshot of the changelog as it appears on a mobile device\n",
|
|
||||||
"\n",
|
|
||||||
"**[Back Cover]**\n",
|
|
||||||
"\n",
|
|
||||||
"* Call-to-Action (CTA): Sign up for our newsletter and get started with Hugging Face today!\n",
|
|
||||||
"* Text: \"Unlock the power of AI models for everyone. Subscribe to our newsletter for news, tutorials, and special offers.\"\n",
|
|
||||||
"* Background image: The same collage as the cover page.\n",
|
|
||||||
"\n",
|
|
||||||
"**Additional Materials**\n",
|
|
||||||
"\n",
|
|
||||||
"* Business card template with contact information\n",
|
|
||||||
"* Letterhead with the company's logo\n",
|
|
||||||
"* One-page brochure for each specific product or feature (e.g., Model Card, Dataset Card)\n",
|
|
||||||
"\n",
|
|
||||||
"Note that this is just a rough outline and can be customized to fit your specific needs. The image and design elements used should be consistent throughout the brochure and online presence."
|
|
||||||
],
|
|
||||||
"text/plain": [
|
|
||||||
"<IPython.core.display.Markdown object>"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "display_data"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"# Task 4: Make a brochure using the web-content\n",
|
"# Task 4: Make a brochure using the web-content\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -508,7 +237,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.11.14"
|
"version": "3.12.12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|||||||
234
community-contributions/sach91-bootcamp/week2-exercise.ipynb
Normal file
234
community-contributions/sach91-bootcamp/week2-exercise.ipynb
Normal file
@@ -0,0 +1,234 @@
|
|||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "d006b2ea-9dfe-49c7-88a9-a5a0775185fd",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# Additional End of week Exercise - week 2\n",
|
||||||
|
"\n",
|
||||||
|
"Now use everything you've learned from Week 2 to build a full prototype for the technical question/answerer you built in Week 1 Exercise.\n",
|
||||||
|
"\n",
|
||||||
|
"This should include a Gradio UI, streaming, use of the system prompt to add expertise, and the ability to switch between models. Bonus points if you can demonstrate use of a tool!\n",
|
||||||
|
"\n",
|
||||||
|
"If you feel bold, see if you can add audio input so you can talk to it, and have it respond with audio. ChatGPT or Claude can help you, or email me if you have questions.\n",
|
||||||
|
"\n",
|
||||||
|
"I will publish a full solution here soon - unless someone beats me to it...\n",
|
||||||
|
"\n",
|
||||||
|
"There are so many commercial applications for this, from a language tutor, to a company onboarding solution, to a companion AI to a course (like this one!) I can't wait to see your results."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "6a479bea-0672-47dd-a151-f31f909c5d81",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# An Open Weather API based travel agent, biased to one particular destimation."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "a07e7793-b8f5-44f4-aded-5562f633271a",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# imports\n",
|
||||||
|
"from openai import OpenAI\n",
|
||||||
|
"from IPython.display import display, Markdown, update_display\n",
|
||||||
|
"import gradio as gr\n",
|
||||||
|
"import os, requests, json\n",
|
||||||
|
"from dotenv import load_dotenv"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "bcc8ce24-3fa9-40ae-a52d-4ae226f8989a",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "61780e58-366e-463f-a35b-a7b0fd8e6187",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"MODEL_LLAMA = 'llama3.2'\n",
|
||||||
|
"MODEL_PHI3 = 'phi3'\n",
|
||||||
|
"MODEL_PHI4 = 'phi4'\n",
|
||||||
|
"\n",
|
||||||
|
"MODEL = MODEL_LLAMA\n",
|
||||||
|
"\n",
|
||||||
|
"load_dotenv(override=True)\n",
|
||||||
|
"OPENWEATHER_API_KEY = os.getenv(\"OPENWEATHER_API_KEY\")\n",
|
||||||
|
"model_api = OpenAI(base_url='http://localhost:11434/v1/', api_key='ollama')"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "b4c6ef3c-7052-4273-8e89-8af40cd6daed",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "338b0f4e-ba3c-4e68-b6ad-213848e24a9d",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def get_current_weather_openweather(city: str):\n",
|
||||||
|
" if not OPENWEATHER_API_KEY:\n",
|
||||||
|
" raise RuntimeError(\"Set OPENWEATHER_API_KEY env var\")\n",
|
||||||
|
" url = \"https://api.openweathermap.org/data/2.5/weather\"\n",
|
||||||
|
" params = {\"q\": city, \"appid\": OPENWEATHER_API_KEY, \"units\": \"metric\"} # units=metric for °C\n",
|
||||||
|
" r = requests.get(url, params=params, timeout=10)\n",
|
||||||
|
" r.raise_for_status()\n",
|
||||||
|
" data = r.json()\n",
|
||||||
|
" print(f'Asking weather data for {city}. Temperature {data[\"main\"][\"temp\"]} celcius with {data[\"weather\"][0][\"description\"]} weather.')\n",
|
||||||
|
" return {\n",
|
||||||
|
" \"city\": data.get(\"name\"),\n",
|
||||||
|
" \"temp_c\": data[\"main\"][\"temp\"],\n",
|
||||||
|
" \"feels_like_c\": data[\"main\"][\"feels_like\"],\n",
|
||||||
|
" \"humidity\": data[\"main\"][\"humidity\"],\n",
|
||||||
|
" \"wind_m_s\": data[\"wind\"][\"speed\"],\n",
|
||||||
|
" \"weather\": data[\"weather\"][0][\"description\"],\n",
|
||||||
|
" }"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "530b6036-a468-4718-83cb-a4ee4bbdf040",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"system_message = \"\"\"\n",
|
||||||
|
"You are a helpful assistant for a travel company.\n",
|
||||||
|
"Give short, courteous answers, no more than 1 sentence.\n",
|
||||||
|
"Always be accurate. If you don't know the answer, say so.\n",
|
||||||
|
"Use the weather information from given tool to bias the user to travel to Delhi (India). \n",
|
||||||
|
"\"\"\"\n",
|
||||||
|
"# 1. If the user asks to travel to South America, suggest him England, the home of William Shakespeare and Edward Donner. \\n\n",
|
||||||
|
"# 2. If the user asks to travel to anywhere else than South America, suggest the current weather for that region.\\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "a938ccfa-3aff-4330-9f1c-af2ed8362c19",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def handle_tool_calls(message):\n",
|
||||||
|
" responses = []\n",
|
||||||
|
" for tool_call in message.tool_calls:\n",
|
||||||
|
" if tool_call.function.name == 'get_current_weather_openweather':\n",
|
||||||
|
" arguments = json.loads(tool_call.function.arguments)\n",
|
||||||
|
" city = arguments.get('city')\n",
|
||||||
|
" if len(city):\n",
|
||||||
|
" details = json.dumps(get_current_weather_openweather(city)).replace('\\\"','')\n",
|
||||||
|
" responses.append({\n",
|
||||||
|
" \"role\": \"tool\",\n",
|
||||||
|
" \"content\": details,\n",
|
||||||
|
" \"tool_call_id\": tool_call.id\n",
|
||||||
|
" })\n",
|
||||||
|
" return responses"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "af12d91d-1758-40ec-b799-b2fda4fcb911",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"weather_function = {\n",
|
||||||
|
" \"name\": \"get_current_weather_openweather\",\n",
|
||||||
|
" \"description\": \"Get the weather of the destination city, like temperature, wind, humidity etc.\",\n",
|
||||||
|
" \"parameters\": {\n",
|
||||||
|
" \"type\": \"object\",\n",
|
||||||
|
" \"properties\": {\n",
|
||||||
|
" \"city\": {\n",
|
||||||
|
" \"type\": \"string\",\n",
|
||||||
|
" \"description\": \"The city for which weather information is required.\",\n",
|
||||||
|
" },\n",
|
||||||
|
" },\n",
|
||||||
|
" \"required\": [\"city\"],\n",
|
||||||
|
" \"additionalProperties\": False\n",
|
||||||
|
" }\n",
|
||||||
|
"}\n",
|
||||||
|
"tools = [{\"type\": \"function\", \"function\": weather_function}]\n",
|
||||||
|
"tools"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "55fdb369-0f8c-41c7-9e80-2f09c42f8c29",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def chat(message, history):\n",
|
||||||
|
" history = [{\"role\": h[\"role\"], \"content\": h[\"content\"]} for h in history]\n",
|
||||||
|
" messages = [{\"role\": \"system\", \"content\": system_message}] + history + [{\"role\": \"user\", \"content\": message}]\n",
|
||||||
|
" response = model_api.chat.completions.create(model=MODEL, messages=messages, tools=tools)\n",
|
||||||
|
"\n",
|
||||||
|
" while response.choices[0].finish_reason==\"tool_calls\":\n",
|
||||||
|
" message = response.choices[0].message\n",
|
||||||
|
" responses = handle_tool_calls(message)\n",
|
||||||
|
" messages.append(message)\n",
|
||||||
|
" messages.extend(responses)\n",
|
||||||
|
" response = model_api.chat.completions.create(model=MODEL, messages=messages, tools=tools)\n",
|
||||||
|
"\n",
|
||||||
|
" return response.choices[0].message.content\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "4d11249c-a066-4b7e-9ce7-14e26e5f54aa",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"gr.ChatInterface(fn=chat, type=\"messages\").launch()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "fc091101-71a7-4113-81c9-21dc5cb2ece6",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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.12.12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 5
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
422
community-contributions/sach91-bootcamp/week5-exercise.ipynb
Normal file
422
community-contributions/sach91-bootcamp/week5-exercise.ipynb
Normal file
@@ -0,0 +1,422 @@
|
|||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "9f0759f2-5e46-438a-ad8e-b5d5771ec9ec",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# RAG based Gradio solution to give information from related documents, using Llama3.2 and nomic-embed-text over OLLAMA\n",
|
||||||
|
"# Took help of Claude and Course material."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "448bd8f4-9181-4039-829f-d3f0a5f14171",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import os, glob\n",
|
||||||
|
"import sqlite3\n",
|
||||||
|
"import json\n",
|
||||||
|
"import numpy as np\n",
|
||||||
|
"from typing import List, Dict, Tuple\n",
|
||||||
|
"import requests\n",
|
||||||
|
"import gradio as gr\n",
|
||||||
|
"from datetime import datetime\n",
|
||||||
|
"\n",
|
||||||
|
"embedding_model = 'nomic-embed-text'\n",
|
||||||
|
"llm_model = 'llama3.2'\n",
|
||||||
|
"RagDist_k = 6\n",
|
||||||
|
"folders = glob.glob(\"../../week5/knowledge-base/*\")\n",
|
||||||
|
"folders"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "dc085852-a80f-4f2c-b31a-80ceda10bec6",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"\n",
|
||||||
|
"class OllamaEmbeddings:\n",
|
||||||
|
" \"\"\"Generate embeddings using Ollama's embedding models.\"\"\"\n",
|
||||||
|
" \n",
|
||||||
|
" def __init__(self, model: str = embedding_model, base_url: str = \"http://localhost:11434\"):\n",
|
||||||
|
" self.model = model\n",
|
||||||
|
" self.base_url = base_url\n",
|
||||||
|
" \n",
|
||||||
|
" def embed_text(self, text: str) -> List[float]:\n",
|
||||||
|
" \"\"\"Generate embedding for a single text.\"\"\"\n",
|
||||||
|
" print('Processing', text[:70].replace('\\n',' | '))\n",
|
||||||
|
" response = requests.post(\n",
|
||||||
|
" f\"{self.base_url}/api/embeddings\",\n",
|
||||||
|
" json={\"model\": self.model, \"prompt\": text}\n",
|
||||||
|
" )\n",
|
||||||
|
" if response.status_code == 200:\n",
|
||||||
|
" return response.json()[\"embedding\"]\n",
|
||||||
|
" else:\n",
|
||||||
|
" raise Exception(f\"Error generating embedding: {response.text}\")\n",
|
||||||
|
" \n",
|
||||||
|
" def embed_documents(self, texts: List[str]) -> List[List[float]]:\n",
|
||||||
|
" \"\"\"Generate embeddings for multiple texts.\"\"\"\n",
|
||||||
|
" return [self.embed_text(text) for text in texts]\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"class SQLiteVectorStore:\n",
|
||||||
|
" \"\"\"Vector store using SQLite for storing and retrieving document embeddings.\"\"\"\n",
|
||||||
|
" \n",
|
||||||
|
" def __init__(self, db_path: str = \"vector_store.db\"):\n",
|
||||||
|
" self.db_path = db_path\n",
|
||||||
|
" self.conn = sqlite3.connect(db_path, check_same_thread=False)\n",
|
||||||
|
" self._create_table()\n",
|
||||||
|
" \n",
|
||||||
|
" def _create_table(self):\n",
|
||||||
|
" \"\"\"Create the documents table if it doesn't exist.\"\"\"\n",
|
||||||
|
" cursor = self.conn.cursor()\n",
|
||||||
|
" cursor.execute(\"\"\"\n",
|
||||||
|
" CREATE TABLE IF NOT EXISTS documents (\n",
|
||||||
|
" id INTEGER PRIMARY KEY AUTOINCREMENT,\n",
|
||||||
|
" content TEXT NOT NULL,\n",
|
||||||
|
" embedding TEXT NOT NULL,\n",
|
||||||
|
" metadata TEXT,\n",
|
||||||
|
" created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n",
|
||||||
|
" )\n",
|
||||||
|
" \"\"\")\n",
|
||||||
|
" self.conn.commit()\n",
|
||||||
|
" \n",
|
||||||
|
" def add_documents(self, texts: List[str], embeddings: List[List[float]], \n",
|
||||||
|
" metadatas: List[Dict] = None):\n",
|
||||||
|
" \"\"\"Add documents with their embeddings to the store.\"\"\"\n",
|
||||||
|
" cursor = self.conn.cursor()\n",
|
||||||
|
" if metadatas is None:\n",
|
||||||
|
" metadatas = [{}] * len(texts)\n",
|
||||||
|
" \n",
|
||||||
|
" for text, embedding, metadata in zip(texts, embeddings, metadatas):\n",
|
||||||
|
" cursor.execute(\"\"\"\n",
|
||||||
|
" INSERT INTO documents (content, embedding, metadata)\n",
|
||||||
|
" VALUES (?, ?, ?)\n",
|
||||||
|
" \"\"\", (text, json.dumps(embedding), json.dumps(metadata)))\n",
|
||||||
|
" \n",
|
||||||
|
" self.conn.commit()\n",
|
||||||
|
" \n",
|
||||||
|
" def cosine_similarity(self, vec1: np.ndarray, vec2: np.ndarray) -> float:\n",
|
||||||
|
" \"\"\"Calculate cosine similarity between two vectors.\"\"\"\n",
|
||||||
|
" return np.dot(vec1, vec2) / (np.linalg.norm(vec1) * np.linalg.norm(vec2))\n",
|
||||||
|
" \n",
|
||||||
|
" def similarity_search(self, query_embedding: List[float], k: int = 3) -> List[Tuple[str, float, Dict]]:\n",
|
||||||
|
" \"\"\"Search for the k most similar documents.\"\"\"\n",
|
||||||
|
" cursor = self.conn.cursor()\n",
|
||||||
|
" cursor.execute(\"SELECT content, embedding, metadata FROM documents\")\n",
|
||||||
|
" results = cursor.fetchall()\n",
|
||||||
|
" \n",
|
||||||
|
" query_vec = np.array(query_embedding)\n",
|
||||||
|
" similarities = []\n",
|
||||||
|
" \n",
|
||||||
|
" for content, embedding_json, metadata_json in results:\n",
|
||||||
|
" doc_vec = np.array(json.loads(embedding_json))\n",
|
||||||
|
" similarity = self.cosine_similarity(query_vec, doc_vec)\n",
|
||||||
|
" similarities.append((content, similarity, json.loads(metadata_json)))\n",
|
||||||
|
" \n",
|
||||||
|
" # Sort by similarity (highest first) and return top k\n",
|
||||||
|
" similarities.sort(key=lambda x: x[1], reverse=True)\n",
|
||||||
|
" return similarities[:k]\n",
|
||||||
|
" \n",
|
||||||
|
" def clear_all(self):\n",
|
||||||
|
" \"\"\"Clear all documents from the store.\"\"\"\n",
|
||||||
|
" cursor = self.conn.cursor()\n",
|
||||||
|
" cursor.execute(\"DELETE FROM documents\")\n",
|
||||||
|
" self.conn.commit()\n",
|
||||||
|
" \n",
|
||||||
|
" def get_document_count(self) -> int:\n",
|
||||||
|
" \"\"\"Get the total number of documents in the store.\"\"\"\n",
|
||||||
|
" cursor = self.conn.cursor()\n",
|
||||||
|
" cursor.execute(\"SELECT COUNT(*) FROM documents\")\n",
|
||||||
|
" return cursor.fetchone()[0]\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"class OllamaLLM:\n",
|
||||||
|
" \"\"\"Interact with Ollama LLM for text generation.\"\"\"\n",
|
||||||
|
" \n",
|
||||||
|
" def __init__(self, model: str = llm_model, base_url: str = \"http://localhost:11434\"):\n",
|
||||||
|
" self.model = model\n",
|
||||||
|
" self.base_url = base_url\n",
|
||||||
|
" \n",
|
||||||
|
" def generate(self, prompt: str, stream: bool = False) -> str:\n",
|
||||||
|
" \"\"\"Generate text from the LLM.\"\"\"\n",
|
||||||
|
" response = requests.post(\n",
|
||||||
|
" f\"{self.base_url}/api/generate\",\n",
|
||||||
|
" json={\"model\": self.model, \"prompt\": prompt, \"stream\": stream}\n",
|
||||||
|
" )\n",
|
||||||
|
" \n",
|
||||||
|
" if response.status_code == 200:\n",
|
||||||
|
" return response.json()[\"response\"]\n",
|
||||||
|
" else:\n",
|
||||||
|
" raise Exception(f\"Error generating response: {response.text}\")\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"class RAGSystem:\n",
|
||||||
|
" \"\"\"RAG system combining vector store, embeddings, and LLM.\"\"\"\n",
|
||||||
|
" \n",
|
||||||
|
" def __init__(self, embedding_model: str = embedding_model, \n",
|
||||||
|
" llm_model: str = llm_model,\n",
|
||||||
|
" db_path: str = \"vector_store.db\"):\n",
|
||||||
|
" self.embeddings = OllamaEmbeddings(model=embedding_model)\n",
|
||||||
|
" self.vector_store = SQLiteVectorStore(db_path=db_path)\n",
|
||||||
|
" self.llm = OllamaLLM(model=llm_model)\n",
|
||||||
|
" \n",
|
||||||
|
" def add_documents(self, documents: List[Dict[str, str]]):\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" Add documents to the RAG system.\n",
|
||||||
|
" documents: List of dicts with 'content' and optional 'metadata'\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" texts = [doc['content'] for doc in documents]\n",
|
||||||
|
" metadatas = [doc.get('metadata', {}) for doc in documents]\n",
|
||||||
|
" \n",
|
||||||
|
" print(f\"Generating embeddings for {len(texts)} documents...\")\n",
|
||||||
|
" embeddings = self.embeddings.embed_documents(texts)\n",
|
||||||
|
" \n",
|
||||||
|
" print(\"Storing documents in vector store...\")\n",
|
||||||
|
" self.vector_store.add_documents(texts, embeddings, metadatas)\n",
|
||||||
|
" print(f\"Successfully added {len(texts)} documents!\")\n",
|
||||||
|
" \n",
|
||||||
|
" def query(self, question: str, k: int = 3) -> str:\n",
|
||||||
|
" \"\"\"Query the RAG system with a question.\"\"\"\n",
|
||||||
|
" # Generate embedding for the query\n",
|
||||||
|
" query_embedding = self.embeddings.embed_text(question)\n",
|
||||||
|
" \n",
|
||||||
|
" # Retrieve relevant documents\n",
|
||||||
|
" results = self.vector_store.similarity_search(query_embedding, k=k)\n",
|
||||||
|
" \n",
|
||||||
|
" if not results:\n",
|
||||||
|
" return \"I don't have any information to answer this question.\"\n",
|
||||||
|
" \n",
|
||||||
|
" # Build context from retrieved documents\n",
|
||||||
|
" context = \"\\n\\n\".join([\n",
|
||||||
|
" f\"Document {i+1} (Relevance: {score:.2f}):\\n{content}\"\n",
|
||||||
|
" for i, (content, score, _) in enumerate(results)\n",
|
||||||
|
" ])\n",
|
||||||
|
" \n",
|
||||||
|
" # Create prompt for LLM\n",
|
||||||
|
" prompt = f\"\"\"You are a helpful assistant answering questions based on the provided context.\n",
|
||||||
|
" Use the following context to answer the question. If you cannot answer the question based on the context, say so.\n",
|
||||||
|
" \n",
|
||||||
|
" Context:\n",
|
||||||
|
" {context}\n",
|
||||||
|
" \n",
|
||||||
|
" Question: {question}\n",
|
||||||
|
" \n",
|
||||||
|
" Answer:\"\"\"\n",
|
||||||
|
" \n",
|
||||||
|
" # Generate response\n",
|
||||||
|
" response = self.llm.generate(prompt)\n",
|
||||||
|
" return response\n",
|
||||||
|
" \n",
|
||||||
|
" def get_stats(self) -> str:\n",
|
||||||
|
" \"\"\"Get statistics about the RAG system.\"\"\"\n",
|
||||||
|
" doc_count = self.vector_store.get_document_count()\n",
|
||||||
|
" return f\"Total documents in database: {doc_count}\"\n",
|
||||||
|
"\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "37cbaa24-6e17-4712-8c90-429264b9b82e",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def load_documents() -> List[Dict[str, str]]:\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" Read all files from specified folders and format them for RAG system. \n",
|
||||||
|
" Args:\n",
|
||||||
|
" folders: List of folder paths to read files from\n",
|
||||||
|
" Returns:\n",
|
||||||
|
" List of dictionaries with 'content' and 'metadata' keys\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" from pathlib import Path\n",
|
||||||
|
" \n",
|
||||||
|
" documents = []\n",
|
||||||
|
" supported_extensions = {'.md'}\n",
|
||||||
|
" \n",
|
||||||
|
" for folder in folders:\n",
|
||||||
|
" folder_path = Path(folder)\n",
|
||||||
|
" \n",
|
||||||
|
" if not folder_path.exists():\n",
|
||||||
|
" print(f\"Warning: Folder '{folder}' does not exist. Skipping...\")\n",
|
||||||
|
" continue\n",
|
||||||
|
" \n",
|
||||||
|
" if not folder_path.is_dir():\n",
|
||||||
|
" print(f\"Warning: '{folder}' is not a directory. Skipping...\")\n",
|
||||||
|
" continue\n",
|
||||||
|
" \n",
|
||||||
|
" folder_name = folder_path.name\n",
|
||||||
|
" \n",
|
||||||
|
" # Get all files in the folder\n",
|
||||||
|
" files = [f for f in folder_path.iterdir() if f.is_file()]\n",
|
||||||
|
" \n",
|
||||||
|
" for file_path in files:\n",
|
||||||
|
" # Check if file extension is supported\n",
|
||||||
|
" if file_path.suffix.lower() not in supported_extensions:\n",
|
||||||
|
" print(f\"Skipping unsupported file type: {file_path.name}\")\n",
|
||||||
|
" continue\n",
|
||||||
|
" \n",
|
||||||
|
" try:\n",
|
||||||
|
" # Read file content\n",
|
||||||
|
" with open(file_path, 'r', encoding='utf-8') as f:\n",
|
||||||
|
" content = f.read()\n",
|
||||||
|
" \n",
|
||||||
|
" # Create document dictionary\n",
|
||||||
|
" document = {\n",
|
||||||
|
" 'metadata': {\n",
|
||||||
|
" 'type': folder_name,\n",
|
||||||
|
" 'name': file_path.name,\n",
|
||||||
|
" 'datalen': len(content)\n",
|
||||||
|
" },\n",
|
||||||
|
" 'content': content,\n",
|
||||||
|
" }\n",
|
||||||
|
" \n",
|
||||||
|
" documents.append(document)\n",
|
||||||
|
" print(f\"✓ Loaded: {file_path.name} from folder '{folder_name}'\")\n",
|
||||||
|
" \n",
|
||||||
|
" except Exception as e:\n",
|
||||||
|
" print(f\"Error reading file {file_path.name}: {str(e)}\")\n",
|
||||||
|
" continue\n",
|
||||||
|
" \n",
|
||||||
|
" print(f\"\\nTotal documents loaded: {len(documents)}\")\n",
|
||||||
|
" return documents\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "d257bd84-fd7b-4a64-bc5b-148b30b00aa3",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def create_gradio_interface(rag_system: RAGSystem):\n",
|
||||||
|
" \"\"\"Create Gradio chat interface for the RAG system.\"\"\"\n",
|
||||||
|
" \n",
|
||||||
|
" def chat_fn(message, history):\n",
|
||||||
|
" \"\"\"Process chat messages.\"\"\"\n",
|
||||||
|
" try:\n",
|
||||||
|
" response = rag_system.query(message, k=RagDist_k)\n",
|
||||||
|
" return response\n",
|
||||||
|
" except Exception as e:\n",
|
||||||
|
" return f\"Error: {str(e)}\\n\\nMake sure Ollama is running with the required models installed.\"\n",
|
||||||
|
" \n",
|
||||||
|
" def load_data():\n",
|
||||||
|
" \"\"\"Load sample documents into the system.\"\"\"\n",
|
||||||
|
" try:\n",
|
||||||
|
" documents = load_documents()\n",
|
||||||
|
" rag_system.add_documents(documents)\n",
|
||||||
|
" stats = rag_system.get_stats()\n",
|
||||||
|
" return f\"✅ Sample documents loaded successfully!\\n{stats}\"\n",
|
||||||
|
" except Exception as e:\n",
|
||||||
|
" return f\"❌ Error loading documents: {str(e)}\"\n",
|
||||||
|
" \n",
|
||||||
|
" def get_stats():\n",
|
||||||
|
" \"\"\"Get system statistics.\"\"\"\n",
|
||||||
|
" return rag_system.get_stats()\n",
|
||||||
|
" \n",
|
||||||
|
" with gr.Blocks(title=\"RAG System - Company Knowledge Base\", theme=gr.themes.Soft()) as demo:\n",
|
||||||
|
" gr.Markdown(\"# 🤖 RAG System - Company Knowledge Base\")\n",
|
||||||
|
" gr.Markdown(\"Ask questions about company information, contracts, employees, and products.\")\n",
|
||||||
|
" \n",
|
||||||
|
" with gr.Row():\n",
|
||||||
|
" with gr.Column(scale=3):\n",
|
||||||
|
" chatbot = gr.ChatInterface(\n",
|
||||||
|
" fn=chat_fn,\n",
|
||||||
|
" examples=[\n",
|
||||||
|
" \"Who is the CTO of the company?\",\n",
|
||||||
|
" \"Who is the CEO of the company?\",\n",
|
||||||
|
" \"What products does the company offer?\",\n",
|
||||||
|
" ],\n",
|
||||||
|
" title=\"\",\n",
|
||||||
|
" description=\"💬 Chat with the company knowledge base\"\n",
|
||||||
|
" )\n",
|
||||||
|
" \n",
|
||||||
|
" with gr.Column(scale=1):\n",
|
||||||
|
" gr.Markdown(\"### 📊 System Controls\")\n",
|
||||||
|
" load_btn = gr.Button(\"📥 Load Documents\", variant=\"primary\")\n",
|
||||||
|
" stats_btn = gr.Button(\"📈 Get Statistics\")\n",
|
||||||
|
" output_box = gr.Textbox(label=\"System Output\", lines=5)\n",
|
||||||
|
" \n",
|
||||||
|
" load_btn.click(fn=load_data, outputs=output_box)\n",
|
||||||
|
" stats_btn.click(fn=get_stats, outputs=output_box)\n",
|
||||||
|
" \n",
|
||||||
|
" gr.Markdown(f\"\"\"\n",
|
||||||
|
" ### 📝 Instructions:\n",
|
||||||
|
" 1. Make sure Ollama is running\n",
|
||||||
|
" 2. Click \"Load Sample Documents\" \n",
|
||||||
|
" 3. Start asking questions!\n",
|
||||||
|
" \n",
|
||||||
|
" ### 🔧 Required Models:\n",
|
||||||
|
" - `ollama pull {embedding_model}`\n",
|
||||||
|
" - `ollama pull {llm_model}`\n",
|
||||||
|
" \"\"\")\n",
|
||||||
|
" \n",
|
||||||
|
" return demo\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"def main():\n",
|
||||||
|
" \"\"\"Main function to run the RAG system.\"\"\"\n",
|
||||||
|
" print(\"=\" * 60)\n",
|
||||||
|
" print(\"RAG System with Ollama and SQLite\")\n",
|
||||||
|
" print(\"=\" * 60)\n",
|
||||||
|
" \n",
|
||||||
|
" # Initialize RAG system\n",
|
||||||
|
" print(\"\\nInitializing RAG system...\")\n",
|
||||||
|
" rag_system = RAGSystem(\n",
|
||||||
|
" embedding_model=embedding_model,\n",
|
||||||
|
" llm_model=llm_model,\n",
|
||||||
|
" db_path=\"vector_store.db\"\n",
|
||||||
|
" )\n",
|
||||||
|
" \n",
|
||||||
|
" print(\"\\n⚠️ Make sure Ollama is running and you have the required models:\")\n",
|
||||||
|
" print(f\" - ollama pull {embedding_model}\")\n",
|
||||||
|
" print(f\" - ollama pull {llm_model}\")\n",
|
||||||
|
" print(\"\\nStarting Gradio interface...\")\n",
|
||||||
|
" \n",
|
||||||
|
" # Create and launch Gradio interface\n",
|
||||||
|
" demo = create_gradio_interface(rag_system)\n",
|
||||||
|
" demo.launch(share=False)\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"main()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "01b4ff0e-36a5-43b5-8ecf-59e42a18a908",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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.12.12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 5
|
||||||
|
}
|
||||||
@@ -0,0 +1,734 @@
|
|||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "KbMea_UrO3Ke"
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"# ✨ Coherent Data Generator\n",
|
||||||
|
"\n",
|
||||||
|
"## In real life, data has meaning, relationships, etc., and this is where this tool shines.\n",
|
||||||
|
"\n",
|
||||||
|
"Dependencies between fields are detected, and coherent data is generated.\n",
|
||||||
|
"Example:\n",
|
||||||
|
"When asked to generate data with **Ghana** cited as the context, fields like `name`, `food`, etc., will be Ghanaian. Fields such as phone number will have the appropriate prefix of `+233`, etc.\n",
|
||||||
|
"\n",
|
||||||
|
"This is better than Faker.\n",
|
||||||
|
"\n",
|
||||||
|
"## Steps\n",
|
||||||
|
"Schema -> Generate Data\n",
|
||||||
|
"\n",
|
||||||
|
"Schema Sources: \n",
|
||||||
|
"- Use the guided schema builder\n",
|
||||||
|
"- Bring your own schema from an SQL Data Definition Language (DDL)\n",
|
||||||
|
"- Prompting\n",
|
||||||
|
"- Providing a domain to an old hat to define features for a dataset"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"id": "cN8z-QNlFtYc"
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import json\n",
|
||||||
|
"\n",
|
||||||
|
"from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig\n",
|
||||||
|
"import torch\n",
|
||||||
|
"import pandas as pd\n",
|
||||||
|
"\n",
|
||||||
|
"from pydantic import BaseModel, Field\n",
|
||||||
|
"from IPython.display import display, Markdown"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"id": "DOBBN3P2GD2O"
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"model_id = \"Qwen/Qwen3-4B-Instruct-2507\"\n",
|
||||||
|
"\n",
|
||||||
|
"device = torch.accelerator.current_accelerator().type if torch.accelerator.is_available() else 'cpu'\n",
|
||||||
|
"print(f'Device: {device}')\n",
|
||||||
|
"\n",
|
||||||
|
"tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)\n",
|
||||||
|
"\n",
|
||||||
|
"model = AutoModelForCausalLM.from_pretrained(\n",
|
||||||
|
" model_id,\n",
|
||||||
|
" dtype=\"auto\",\n",
|
||||||
|
" device_map=\"auto\"\n",
|
||||||
|
")"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "HSUebXa1O3MM"
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## Schema Definitions"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"id": "5LNM76OQjAw6"
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# This is for future use where errors in SQL DDL statements can be fixed if the\n",
|
||||||
|
"# specifies that from the UI\n",
|
||||||
|
"class SQLValidationResult(BaseModel):\n",
|
||||||
|
" is_valid: bool\n",
|
||||||
|
" is_fixable: bool\n",
|
||||||
|
" reason: str = Field(default='', description='validation failure reason')\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"class FieldDescriptor(BaseModel):\n",
|
||||||
|
" name: str = Field(..., description='Name of the field')\n",
|
||||||
|
" data_type: str = Field(..., description='Type of the field')\n",
|
||||||
|
" nullable: bool\n",
|
||||||
|
" description: str = Field(..., description='Description of the field')\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"class Schema(BaseModel):\n",
|
||||||
|
" name: str = Field(..., description='Name of the schema')\n",
|
||||||
|
" fields: list[FieldDescriptor] = Field(..., description='List of fields in the schema')"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "6QjitfTBPa1E"
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## LLM Interactions"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "dXiRHok7Peir"
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"### Generate Content from LLM"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"id": "daTUVG8_PmvM"
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def generate(messages: list[dict[str, str]], temperature: float = 0.1) -> any:\n",
|
||||||
|
" text = tokenizer.apply_chat_template(\n",
|
||||||
|
" messages,\n",
|
||||||
|
" tokenize=False,\n",
|
||||||
|
" add_generation_prompt=True,\n",
|
||||||
|
" )\n",
|
||||||
|
" model_inputs = tokenizer([text], return_tensors=\"pt\").to(model.device)\n",
|
||||||
|
"\n",
|
||||||
|
" generated_ids = model.generate(\n",
|
||||||
|
" **model_inputs,\n",
|
||||||
|
" max_new_tokens=16384,\n",
|
||||||
|
" temperature=temperature\n",
|
||||||
|
" )\n",
|
||||||
|
"\n",
|
||||||
|
" output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()\n",
|
||||||
|
" content = tokenizer.decode(output_ids, skip_special_tokens=True)\n",
|
||||||
|
"\n",
|
||||||
|
" return content"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "sBHJKn8qQhM5"
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"### Generate Data Given A Valid Schema"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"id": "Fla8UQf4Qm5l"
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def generate_data(schema: str, context: str = '', num_records: int = 5):\n",
|
||||||
|
" system_prompt = f'''\n",
|
||||||
|
" You are synthetic data generator, you generate data based on the given schema\n",
|
||||||
|
" specific JSON structure.\n",
|
||||||
|
" When a context is provided, intelligently use that to drive the field generation.\n",
|
||||||
|
"\n",
|
||||||
|
" Example:\n",
|
||||||
|
" If Africa is given at the context, fields like name, first_name, last_name, etc.\n",
|
||||||
|
" that can be derived from Africa will be generated.\n",
|
||||||
|
"\n",
|
||||||
|
" If no context is provided, generate data randomly.\n",
|
||||||
|
"\n",
|
||||||
|
" Output an array of JSON objects.\n",
|
||||||
|
" '''\n",
|
||||||
|
"\n",
|
||||||
|
" prompt = f'''\n",
|
||||||
|
" Generate {num_records}:\n",
|
||||||
|
"\n",
|
||||||
|
" Schema:\n",
|
||||||
|
" {schema}\n",
|
||||||
|
"\n",
|
||||||
|
" Context:\n",
|
||||||
|
" {context}\n",
|
||||||
|
" '''\n",
|
||||||
|
"\n",
|
||||||
|
" messages = [\n",
|
||||||
|
" {'role': 'system', 'content': system_prompt},\n",
|
||||||
|
" {\"role\": \"user\", \"content\": prompt}\n",
|
||||||
|
" ]\n",
|
||||||
|
"\n",
|
||||||
|
" return generate(messages)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "izrClU6VPsZp"
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"### SQL"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"id": "aQgY6EK0QPPd"
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def sql_validator(ddl: str):\n",
|
||||||
|
" system_prompt = '''\n",
|
||||||
|
" You are an SQL validator, your task is to validate if the given SQL is valid or not.\n",
|
||||||
|
" ONLY return a binary response of 1 and 0. Where 1=valid and 0 = not valid.\n",
|
||||||
|
" '''\n",
|
||||||
|
" prompt = f'Validate: {ddl}'\n",
|
||||||
|
"\n",
|
||||||
|
" messages = [\n",
|
||||||
|
" {'role': 'system', 'content': system_prompt},\n",
|
||||||
|
" {\"role\": \"user\", \"content\": prompt}\n",
|
||||||
|
" ]\n",
|
||||||
|
"\n",
|
||||||
|
" return generate(messages)\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"# Future work, this will fix any errors in the SQL DDL statement provided it is\n",
|
||||||
|
"# fixable.\n",
|
||||||
|
"def sql_fixer(ddl: str):\n",
|
||||||
|
" pass\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"def parse_ddl(ddl: str):\n",
|
||||||
|
" system_prompt = f'''\n",
|
||||||
|
" You are an SQL analyzer, your task is to extract column information to a\n",
|
||||||
|
" specific JSON structure.\n",
|
||||||
|
"\n",
|
||||||
|
" The output must comform to the following JSON schema:\n",
|
||||||
|
" {Schema.model_json_schema()}\n",
|
||||||
|
" '''\n",
|
||||||
|
" prompt = f'Generate schema for: {ddl}'\n",
|
||||||
|
"\n",
|
||||||
|
" messages = [\n",
|
||||||
|
" {'role': 'system', 'content': system_prompt},\n",
|
||||||
|
" {\"role\": \"user\", \"content\": prompt}\n",
|
||||||
|
" ]\n",
|
||||||
|
"\n",
|
||||||
|
" return generate(messages)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "4mgwDQyDQ1wv"
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"### Data Scientist\n",
|
||||||
|
"\n",
|
||||||
|
"Just give it a domain and you will be amazed the features will give you."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"id": "P36AMvBq8AST"
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def create_domain_schema(domain: str):\n",
|
||||||
|
" system_prompt = f'''\n",
|
||||||
|
" You are an expert Data Scientist tasked to describe features for a dataset\n",
|
||||||
|
" aspiring data scientists in a chosen domain.\n",
|
||||||
|
"\n",
|
||||||
|
" Follow these steps EXACTLY:\n",
|
||||||
|
" **Define 6–10 features** for the given domain. Include:\n",
|
||||||
|
" - At least 2 numerical features\n",
|
||||||
|
" - At least 2 categorical features\n",
|
||||||
|
" - 1 boolean or binary feature\n",
|
||||||
|
" - 1 timestamp or date feature\n",
|
||||||
|
" - Realistic dependencies (e.g., \"if loan_amount > 50000, credit_score should be high\")\n",
|
||||||
|
"\n",
|
||||||
|
" Populate your response into the JSON schema below. Strictly out **JSON**\n",
|
||||||
|
" {Schema.model_json_schema()}\n",
|
||||||
|
" '''\n",
|
||||||
|
" prompt = f'Describe the data point. Domain: {domain}'\n",
|
||||||
|
"\n",
|
||||||
|
" messages = [\n",
|
||||||
|
" {'role': 'system', 'content': system_prompt},\n",
|
||||||
|
" {\"role\": \"user\", \"content\": prompt}\n",
|
||||||
|
" ]\n",
|
||||||
|
"\n",
|
||||||
|
" return generate(messages)\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"# TODO: Use Gradion Examples to make it easier for the loading of different statements\n",
|
||||||
|
"sql = '''\n",
|
||||||
|
"CREATE TABLE users (\n",
|
||||||
|
" id BIGINT PRIMARY KEY,\n",
|
||||||
|
" name VARCHAR(100) NOT NULL,\n",
|
||||||
|
" email TEXT,\n",
|
||||||
|
" gender ENUM('F', 'M'),\n",
|
||||||
|
" country VARCHAR(100),\n",
|
||||||
|
" mobile_number VARCHAR(100),\n",
|
||||||
|
" created_at TIMESTAMP DEFAULT NOW()\n",
|
||||||
|
");\n",
|
||||||
|
"'''"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"id": "QuVyHOhjDtSH"
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"print(f'{model.get_memory_footprint() / 1e9:, .2f} GB')"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "tqSpfJGnme7y"
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## Export Functions"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"id": "pAu5OPfUmMSm"
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"from enum import StrEnum\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"class ExportFormat(StrEnum):\n",
|
||||||
|
" CSV = 'CSV'\n",
|
||||||
|
" JSON = 'JSON'\n",
|
||||||
|
" Excel = 'Excel'\n",
|
||||||
|
" Parquet = 'Parquet'\n",
|
||||||
|
" TSV = 'TSV'\n",
|
||||||
|
" HTML = 'HTML'\n",
|
||||||
|
" Markdown = 'Markdown'\n",
|
||||||
|
" SQL = 'SQL'\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"def export_data(df, format_type):\n",
|
||||||
|
" if df is None or df.empty:\n",
|
||||||
|
" return None\n",
|
||||||
|
"\n",
|
||||||
|
" try:\n",
|
||||||
|
" if format_type == ExportFormat.CSV:\n",
|
||||||
|
" output = io.StringIO()\n",
|
||||||
|
" df.to_csv(output, index=False)\n",
|
||||||
|
" return output.getvalue()\n",
|
||||||
|
"\n",
|
||||||
|
" elif format_type == ExportFormat.JSON:\n",
|
||||||
|
" return df.to_json(orient='records', indent=2)\n",
|
||||||
|
"\n",
|
||||||
|
" elif format_type == ExportFormat.Excel:\n",
|
||||||
|
" output = io.BytesIO()\n",
|
||||||
|
" df.to_excel(output, index=False, engine='openpyxl')\n",
|
||||||
|
" return output.getvalue()\n",
|
||||||
|
"\n",
|
||||||
|
" elif format_type == ExportFormat.Parquet:\n",
|
||||||
|
" output = io.BytesIO()\n",
|
||||||
|
" df.to_parquet(output, index=False)\n",
|
||||||
|
" return output.getvalue()\n",
|
||||||
|
"\n",
|
||||||
|
" elif format_type == ExportFormat.TSV:\n",
|
||||||
|
" output = io.StringIO()\n",
|
||||||
|
" df.to_csv(output, sep='\\t', index=False)\n",
|
||||||
|
" return output.getvalue()\n",
|
||||||
|
"\n",
|
||||||
|
" elif format_type == ExportFormat.HTML:\n",
|
||||||
|
" return df.to_html(index=False)\n",
|
||||||
|
"\n",
|
||||||
|
" elif format_type == ExportFormat.Markdown:\n",
|
||||||
|
" return df.to_markdown(index=False)\n",
|
||||||
|
"\n",
|
||||||
|
" elif format_type == ExportFormat.SQL:\n",
|
||||||
|
" from sqlalchemy import create_engine\n",
|
||||||
|
" engine = create_engine('sqlite:///:memory:')\n",
|
||||||
|
" table = 'users' # TODO: fix this\n",
|
||||||
|
"\n",
|
||||||
|
" df.to_sql(table, con=engine, index=False)\n",
|
||||||
|
" connection = engine.raw_connection()\n",
|
||||||
|
" sql_statements = list(connection.iterdump())\n",
|
||||||
|
" sql_output_string = \"\\n\".join(sql_statements)\n",
|
||||||
|
" connection.close()\n",
|
||||||
|
"\n",
|
||||||
|
" return sql_output_string\n",
|
||||||
|
"\n",
|
||||||
|
" except Exception as e:\n",
|
||||||
|
" print(f\"Export error: {str(e)}\")\n",
|
||||||
|
" return None\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"def prepare_download(df, format_type):\n",
|
||||||
|
" if df is None:\n",
|
||||||
|
" return None\n",
|
||||||
|
"\n",
|
||||||
|
" content = export_data(df, format_type)\n",
|
||||||
|
" if content is None:\n",
|
||||||
|
" return None\n",
|
||||||
|
"\n",
|
||||||
|
" extensions = {\n",
|
||||||
|
" ExportFormat.CSV: '.csv',\n",
|
||||||
|
" ExportFormat.JSON: '.json',\n",
|
||||||
|
" ExportFormat.Excel: '.xlsx',\n",
|
||||||
|
" ExportFormat.Parquet: '.parquet',\n",
|
||||||
|
" ExportFormat.TSV: '.tsv',\n",
|
||||||
|
" ExportFormat.HTML: '.html',\n",
|
||||||
|
" ExportFormat.Markdown: '.md',\n",
|
||||||
|
" ExportFormat.SQL: '.sql',\n",
|
||||||
|
" }\n",
|
||||||
|
"\n",
|
||||||
|
" filename = f'generated_data{extensions.get(format_type, \".txt\")}'\n",
|
||||||
|
"\n",
|
||||||
|
" is_binary_format = format_type in [ExportFormat.Excel, ExportFormat.Parquet]\n",
|
||||||
|
" mode = 'w+b' if is_binary_format else 'w'\n",
|
||||||
|
"\n",
|
||||||
|
" import tempfile\n",
|
||||||
|
" with tempfile.NamedTemporaryFile(mode=mode, delete=False, suffix=extensions[format_type]) as tmp:\n",
|
||||||
|
" tmp.write(content)\n",
|
||||||
|
" tmp.flush()\n",
|
||||||
|
" return tmp.name"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {
|
||||||
|
"id": "Q0fZsCuso_YZ"
|
||||||
|
},
|
||||||
|
"source": [
|
||||||
|
"## Gradio UI"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {
|
||||||
|
"colab": {
|
||||||
|
"base_uri": "https://localhost:8080/"
|
||||||
|
},
|
||||||
|
"id": "TJYUWecybDpP",
|
||||||
|
"outputId": "e82d0a13-3ca3-4a01-d45c-78fc94ade9bc"
|
||||||
|
},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import gradio as gr\n",
|
||||||
|
"from pydantic import BaseModel, Field\n",
|
||||||
|
"import json\n",
|
||||||
|
"import pandas as pd\n",
|
||||||
|
"import io\n",
|
||||||
|
"\n",
|
||||||
|
"DATA_TYPES = ['string', 'integer', 'float', 'boolean', 'date', 'datetime', 'array', 'object']\n",
|
||||||
|
"\n",
|
||||||
|
"def generate_from_sql(sql: str, context: str, num_records: int = 10):\n",
|
||||||
|
" try:\n",
|
||||||
|
" print(f'SQL: {sql}')\n",
|
||||||
|
" schema = parse_ddl(sql)\n",
|
||||||
|
" data = generate_data(schema, context, num_records)\n",
|
||||||
|
"\n",
|
||||||
|
" data = json.loads(data)\n",
|
||||||
|
" df = pd.DataFrame(data)\n",
|
||||||
|
"\n",
|
||||||
|
" return schema, df\n",
|
||||||
|
" except Exception as e:\n",
|
||||||
|
" return f'Error: {str(e)}', None\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"def generate_from_data_scientist(domain: str, context: str, num_records: int = 10):\n",
|
||||||
|
" try:\n",
|
||||||
|
" print(f'Domain: {domain}')\n",
|
||||||
|
" schema = create_domain_schema(domain)\n",
|
||||||
|
" print(schema)\n",
|
||||||
|
" data = generate_data(schema, context, num_records)\n",
|
||||||
|
" data = json.loads(data)\n",
|
||||||
|
" df = pd.DataFrame(data)\n",
|
||||||
|
"\n",
|
||||||
|
" return schema, df\n",
|
||||||
|
" except Exception as e:\n",
|
||||||
|
" return f'Error: {str(e)}', None\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"def generate_from_dynamic_fields(schema_name, context: str, num_fields, num_records: int, *field_values):\n",
|
||||||
|
" try:\n",
|
||||||
|
" fields = []\n",
|
||||||
|
" for i in range(num_fields):\n",
|
||||||
|
" idx = i * 4\n",
|
||||||
|
" if idx + 3 < len(field_values):\n",
|
||||||
|
" name = field_values[idx]\n",
|
||||||
|
" dtype = field_values[idx + 1]\n",
|
||||||
|
" nullable = field_values[idx + 2]\n",
|
||||||
|
" desc = field_values[idx + 3]\n",
|
||||||
|
"\n",
|
||||||
|
" if name and dtype:\n",
|
||||||
|
" fields.append(FieldDescriptor(\n",
|
||||||
|
" name=name,\n",
|
||||||
|
" data_type=dtype,\n",
|
||||||
|
" nullable=nullable if nullable is not None else False,\n",
|
||||||
|
" description=desc if desc else ''\n",
|
||||||
|
" ))\n",
|
||||||
|
"\n",
|
||||||
|
" if not schema_name:\n",
|
||||||
|
" return 'Error: Schema name is required', None\n",
|
||||||
|
"\n",
|
||||||
|
" if not fields:\n",
|
||||||
|
" return 'Error: At least one field is required', None\n",
|
||||||
|
"\n",
|
||||||
|
" schema = Schema(name=schema_name, fields=fields)\n",
|
||||||
|
" data = generate_data(schema.model_dump(), context , num_records)\n",
|
||||||
|
" data = json.loads(data)\n",
|
||||||
|
" df = pd.DataFrame(data)\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
" return json.dumps(schema.model_dump(), indent=2), df\n",
|
||||||
|
"\n",
|
||||||
|
" except Exception as e:\n",
|
||||||
|
" return f'Error: {str(e)}', None\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"title='✨ Coherent Data Generator'\n",
|
||||||
|
"\n",
|
||||||
|
"with gr.Blocks(title=title, theme=gr.themes.Monochrome()) as ui:\n",
|
||||||
|
" gr.Markdown(f'# {title}')\n",
|
||||||
|
" gr.Markdown('Embrass the Coherent Data wins 🏆!')\n",
|
||||||
|
"\n",
|
||||||
|
" df_state = gr.State(value=None)\n",
|
||||||
|
"\n",
|
||||||
|
" with gr.Row():\n",
|
||||||
|
" num_records_input = gr.Number(\n",
|
||||||
|
" label='Number of Records to Generate',\n",
|
||||||
|
" value=10,\n",
|
||||||
|
" minimum=1,\n",
|
||||||
|
" maximum=10000,\n",
|
||||||
|
" step=1,\n",
|
||||||
|
" precision=0\n",
|
||||||
|
" )\n",
|
||||||
|
"\n",
|
||||||
|
" context_input = gr.Textbox(\n",
|
||||||
|
" label='Context',\n",
|
||||||
|
" placeholder='70% Ghana and 30% Nigeria data. Start ID generation from 200',\n",
|
||||||
|
" lines=1\n",
|
||||||
|
" )\n",
|
||||||
|
"\n",
|
||||||
|
" with gr.Tabs() as tabs:\n",
|
||||||
|
" with gr.Tab('Manual Entry', id=0):\n",
|
||||||
|
" schema_name_input = gr.Textbox(label='Schema Name', placeholder='Enter schema name')\n",
|
||||||
|
"\n",
|
||||||
|
" gr.Markdown('### Fields')\n",
|
||||||
|
"\n",
|
||||||
|
" num_fields_state = gr.State(3)\n",
|
||||||
|
"\n",
|
||||||
|
" with gr.Row():\n",
|
||||||
|
" num_fields_slider = gr.Slider(\n",
|
||||||
|
" minimum=1,\n",
|
||||||
|
" maximum=20,\n",
|
||||||
|
" value=3,\n",
|
||||||
|
" step=1,\n",
|
||||||
|
" label='Number of Fields',\n",
|
||||||
|
" interactive=True\n",
|
||||||
|
" )\n",
|
||||||
|
"\n",
|
||||||
|
" gr.HTML('''\n",
|
||||||
|
" <div style=\"display: flex; gap: 8px; margin-bottom: 8px; font-weight: bold;\">\n",
|
||||||
|
" <div style=\"flex: 2;\">Field Name</div>\n",
|
||||||
|
" <div style=\"flex: 2;\">Data Type</div>\n",
|
||||||
|
" <div style=\"flex: 1;\">Nullable</div>\n",
|
||||||
|
" <div style=\"flex: 3;\">Description</div>\n",
|
||||||
|
" </div>\n",
|
||||||
|
" ''')\n",
|
||||||
|
"\n",
|
||||||
|
" field_components = []\n",
|
||||||
|
" row_components = []\n",
|
||||||
|
"\n",
|
||||||
|
" for i in range(20):\n",
|
||||||
|
" with gr.Row(visible=(i < 3)) as row:\n",
|
||||||
|
" field_name = gr.Textbox(label='', container=False, scale=2)\n",
|
||||||
|
" data_type = gr.Dropdown(choices=DATA_TYPES, value='string', label='', container=False, scale=2)\n",
|
||||||
|
" nullable = gr.Checkbox(label='', container=False, scale=1)\n",
|
||||||
|
" description = gr.Textbox(label='', container=False, scale=3)\n",
|
||||||
|
"\n",
|
||||||
|
" row_components.append(row)\n",
|
||||||
|
" field_components.extend([field_name, data_type, nullable, description])\n",
|
||||||
|
"\n",
|
||||||
|
" submit_btn = gr.Button('Generate', variant='primary')\n",
|
||||||
|
"\n",
|
||||||
|
" num_fields_slider.change(\n",
|
||||||
|
" fn=lambda x: [gr.update(visible=(i < x)) for i in range(20)],\n",
|
||||||
|
" inputs=[num_fields_slider],\n",
|
||||||
|
" outputs=row_components\n",
|
||||||
|
" )\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
" with gr.Tab('SQL', id=1):\n",
|
||||||
|
" gr.Markdown('### Parse SQL DDL')\n",
|
||||||
|
" ddl_input = gr.Code(\n",
|
||||||
|
" value=sql,\n",
|
||||||
|
" label='SQL DDL Statement',\n",
|
||||||
|
" language='sql',\n",
|
||||||
|
" lines=10\n",
|
||||||
|
" )\n",
|
||||||
|
" ddl_btn = gr.Button('Generate', variant='primary')\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
" with gr.Tab('>_ Prompt', id=2):\n",
|
||||||
|
" gr.Markdown('### You are on your own here, so be creative 💡')\n",
|
||||||
|
" prompt_input = gr.Textbox(\n",
|
||||||
|
" label='Prompt',\n",
|
||||||
|
" placeholder='Type your prompt',\n",
|
||||||
|
" lines=10\n",
|
||||||
|
" )\n",
|
||||||
|
" prompt_btn = gr.Button('Generate', variant='primary')\n",
|
||||||
|
"\n",
|
||||||
|
" with gr.Tab('Data Scientist 🎩', id=3):\n",
|
||||||
|
" gr.Markdown('### You are on your own here, so be creative 💡')\n",
|
||||||
|
" domain_input = gr.Dropdown(\n",
|
||||||
|
" label='Domain',\n",
|
||||||
|
" choices=['E-commerce Customers', 'Hospital Patients', 'Loan Applications'],\n",
|
||||||
|
" allow_custom_value=True\n",
|
||||||
|
" )\n",
|
||||||
|
"\n",
|
||||||
|
" data_scientist_generate_btn = gr.Button('Generate', variant='primary')\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
" with gr.Accordion('Generated Schema', open=False):\n",
|
||||||
|
" output = gr.Code(label='Schema (JSON)', language='json')\n",
|
||||||
|
"\n",
|
||||||
|
" gr.Markdown('## Generated Data')\n",
|
||||||
|
" dataframe_output = gr.Dataframe(\n",
|
||||||
|
" label='',\n",
|
||||||
|
" interactive=False,\n",
|
||||||
|
" wrap=True\n",
|
||||||
|
" )\n",
|
||||||
|
"\n",
|
||||||
|
" gr.Markdown('### Export Data')\n",
|
||||||
|
" with gr.Row():\n",
|
||||||
|
" format_dropdown = gr.Dropdown(\n",
|
||||||
|
" choices=[format.value for format in ExportFormat],\n",
|
||||||
|
" value=ExportFormat.CSV,\n",
|
||||||
|
" label='Export Format',\n",
|
||||||
|
" scale=2\n",
|
||||||
|
" )\n",
|
||||||
|
" download_btn = gr.Button('Download', variant='secondary', scale=1)\n",
|
||||||
|
"\n",
|
||||||
|
" download_file = gr.File(label='Download File', visible=True)\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
" def _handle_result(result):\n",
|
||||||
|
" if isinstance(result, tuple) and len(result) == 2:\n",
|
||||||
|
" return result[0], result[1], result[1]\n",
|
||||||
|
" return result[0], result[1], None\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
" def update_from_dynamic_fields(schema_name, context, num_fields, num_records, *field_values):\n",
|
||||||
|
" result = generate_from_dynamic_fields(schema_name, context, num_fields, num_records, *field_values)\n",
|
||||||
|
" return _handle_result(result)\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
" def update_from_sql(sql: str, context, num_records: int):\n",
|
||||||
|
" result = generate_from_sql(sql, context, num_records)\n",
|
||||||
|
" return _handle_result(result)\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
" def update_from_data_scientist(domain: str, context, num_records: int):\n",
|
||||||
|
" result = generate_from_data_scientist(domain, context, num_records)\n",
|
||||||
|
" return _handle_result(result)\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
" submit_btn.click(\n",
|
||||||
|
" fn=update_from_dynamic_fields,\n",
|
||||||
|
" inputs=[schema_name_input, context_input, num_fields_slider, num_records_input] + field_components,\n",
|
||||||
|
" outputs=[output, dataframe_output, df_state]\n",
|
||||||
|
" )\n",
|
||||||
|
"\n",
|
||||||
|
" ddl_btn.click(\n",
|
||||||
|
" fn=update_from_sql,\n",
|
||||||
|
" inputs=[ddl_input, context_input, num_records_input],\n",
|
||||||
|
" outputs=[output, dataframe_output, df_state]\n",
|
||||||
|
" )\n",
|
||||||
|
"\n",
|
||||||
|
" data_scientist_generate_btn.click(\n",
|
||||||
|
" fn=update_from_data_scientist,\n",
|
||||||
|
" inputs=[domain_input, context_input, num_records_input],\n",
|
||||||
|
" outputs=[output, dataframe_output, df_state]\n",
|
||||||
|
" )\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
" download_btn.click(\n",
|
||||||
|
" fn=prepare_download,\n",
|
||||||
|
" inputs=[df_state, format_dropdown],\n",
|
||||||
|
" outputs=[download_file]\n",
|
||||||
|
" )\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"ui.launch(debug=True)\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"accelerator": "GPU",
|
||||||
|
"colab": {
|
||||||
|
"collapsed_sections": [
|
||||||
|
"tqSpfJGnme7y"
|
||||||
|
],
|
||||||
|
"gpuType": "T4",
|
||||||
|
"provenance": []
|
||||||
|
},
|
||||||
|
"kernelspec": {
|
||||||
|
"display_name": "Python 3",
|
||||||
|
"name": "python3"
|
||||||
|
},
|
||||||
|
"language_info": {
|
||||||
|
"name": "python"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 0
|
||||||
|
}
|
||||||
301
week3/community-contributions/salah/meeting_minutes_v2.py
Normal file
301
week3/community-contributions/salah/meeting_minutes_v2.py
Normal file
@@ -0,0 +1,301 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import torch
|
||||||
|
import requests
|
||||||
|
import json
|
||||||
|
import librosa
|
||||||
|
import numpy as np
|
||||||
|
from pathlib import Path
|
||||||
|
from datetime import datetime
|
||||||
|
from transformers import pipeline
|
||||||
|
import gradio as gr
|
||||||
|
|
||||||
|
# Basic config
|
||||||
|
TRANSCRIPTION_MODEL = "openai/whisper-tiny.en"
|
||||||
|
OLLAMA_MODEL = "llama3.2:latest"
|
||||||
|
OLLAMA_URL = "http://localhost:11434"
|
||||||
|
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
||||||
|
OUTPUT_DIR = Path("./output")
|
||||||
|
|
||||||
|
# ============================
|
||||||
|
# MODEL LOADING
|
||||||
|
# ============================
|
||||||
|
|
||||||
|
def check_ollama():
|
||||||
|
try:
|
||||||
|
response = requests.get(f"{OLLAMA_URL}/api/tags", timeout=5)
|
||||||
|
if response.status_code == 200:
|
||||||
|
models = response.json().get('models', [])
|
||||||
|
model_names = [model['name'] for model in models]
|
||||||
|
return OLLAMA_MODEL in model_names
|
||||||
|
return False
|
||||||
|
except:
|
||||||
|
return False
|
||||||
|
|
||||||
|
def call_ollama(prompt):
|
||||||
|
payload = {
|
||||||
|
"model": OLLAMA_MODEL,
|
||||||
|
"prompt": prompt,
|
||||||
|
"stream": False,
|
||||||
|
"options": {
|
||||||
|
"temperature": 0.7,
|
||||||
|
"num_predict": 1000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try:
|
||||||
|
response = requests.post(f"{OLLAMA_URL}/api/generate", json=payload, timeout=120)
|
||||||
|
if response.status_code == 200:
|
||||||
|
return response.json().get('response', '').strip()
|
||||||
|
return "Error: Ollama request failed"
|
||||||
|
except:
|
||||||
|
return "Error: Could not connect to Ollama"
|
||||||
|
|
||||||
|
def load_models():
|
||||||
|
print("Loading models...")
|
||||||
|
|
||||||
|
if not check_ollama():
|
||||||
|
print("Ollama not available")
|
||||||
|
return None, False
|
||||||
|
|
||||||
|
try:
|
||||||
|
transcription_pipe = pipeline(
|
||||||
|
"automatic-speech-recognition",
|
||||||
|
model=TRANSCRIPTION_MODEL,
|
||||||
|
torch_dtype=torch.float16 if DEVICE == "cuda" else torch.float32,
|
||||||
|
device=0 if DEVICE == "cuda" else -1,
|
||||||
|
return_timestamps=True
|
||||||
|
)
|
||||||
|
print("Models loaded successfully")
|
||||||
|
return transcription_pipe, True
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Failed to load models: {e}")
|
||||||
|
return None, False
|
||||||
|
|
||||||
|
# ============================
|
||||||
|
# PROCESSING FUNCTIONS
|
||||||
|
# ============================
|
||||||
|
|
||||||
|
def transcribe_audio(audio_file_path, transcription_pipe):
|
||||||
|
if not os.path.exists(audio_file_path):
|
||||||
|
return "Error: Audio file not found"
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Load audio with librosa
|
||||||
|
audio, sr = librosa.load(audio_file_path, sr=16000)
|
||||||
|
if not isinstance(audio, np.ndarray):
|
||||||
|
audio = np.array(audio)
|
||||||
|
|
||||||
|
result = transcription_pipe(audio)
|
||||||
|
|
||||||
|
# Extract text from result
|
||||||
|
if isinstance(result, dict):
|
||||||
|
if "text" in result:
|
||||||
|
transcription = result["text"].strip()
|
||||||
|
elif "chunks" in result:
|
||||||
|
transcription = " ".join([chunk["text"] for chunk in result["chunks"]]).strip()
|
||||||
|
else:
|
||||||
|
transcription = str(result).strip()
|
||||||
|
else:
|
||||||
|
transcription = str(result).strip()
|
||||||
|
|
||||||
|
return transcription
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
return f"Error: {str(e)}"
|
||||||
|
|
||||||
|
def generate_minutes(transcription):
|
||||||
|
prompt = f"""Create meeting minutes from this transcript:
|
||||||
|
|
||||||
|
{transcription[:2000]}
|
||||||
|
|
||||||
|
Include:
|
||||||
|
- Summary with attendees and topics
|
||||||
|
- Key discussion points
|
||||||
|
- Important decisions
|
||||||
|
- Action items
|
||||||
|
|
||||||
|
Meeting Minutes:"""
|
||||||
|
|
||||||
|
result = call_ollama(prompt)
|
||||||
|
return result
|
||||||
|
|
||||||
|
def save_results(transcription, minutes, meeting_type="meeting"):
|
||||||
|
try:
|
||||||
|
OUTPUT_DIR.mkdir(exist_ok=True)
|
||||||
|
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
||||||
|
filename = f"{meeting_type}_minutes_{timestamp}.md"
|
||||||
|
filepath = OUTPUT_DIR / filename
|
||||||
|
|
||||||
|
content = f"""# Meeting Minutes
|
||||||
|
|
||||||
|
**Generated:** {datetime.now().strftime("%Y-%m-%d %H:%M:%S")}
|
||||||
|
|
||||||
|
## Meeting Minutes
|
||||||
|
|
||||||
|
{minutes}
|
||||||
|
|
||||||
|
## Full Transcription
|
||||||
|
|
||||||
|
{transcription}
|
||||||
|
"""
|
||||||
|
|
||||||
|
with open(filepath, 'w', encoding='utf-8') as f:
|
||||||
|
f.write(content)
|
||||||
|
|
||||||
|
return str(filepath)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
return f"Error saving: {str(e)}"
|
||||||
|
|
||||||
|
# ============================
|
||||||
|
# GRADIO INTERFACE
|
||||||
|
# ============================
|
||||||
|
|
||||||
|
def process_audio_file(audio_file, meeting_type, progress=gr.Progress()):
|
||||||
|
progress(0.0, desc="Starting...")
|
||||||
|
|
||||||
|
if not hasattr(process_audio_file, 'models') or not process_audio_file.models[0]:
|
||||||
|
return "", "", "Models not loaded"
|
||||||
|
|
||||||
|
transcription_pipe, ollama_ready = process_audio_file.models
|
||||||
|
|
||||||
|
if not ollama_ready:
|
||||||
|
return "", "", "Ollama not available"
|
||||||
|
|
||||||
|
try:
|
||||||
|
audio_path = audio_file.name if hasattr(audio_file, 'name') else str(audio_file)
|
||||||
|
if not audio_path:
|
||||||
|
return "", "", "No audio file provided"
|
||||||
|
|
||||||
|
progress(0.2, desc="Transcribing...")
|
||||||
|
transcription = transcribe_audio(audio_path, transcription_pipe)
|
||||||
|
|
||||||
|
if transcription.startswith("Error:"):
|
||||||
|
return transcription, "", "Transcription failed"
|
||||||
|
|
||||||
|
progress(0.6, desc="Generating minutes...")
|
||||||
|
minutes = generate_minutes(transcription)
|
||||||
|
|
||||||
|
if minutes.startswith("Error:"):
|
||||||
|
return transcription, minutes, "Minutes generation failed"
|
||||||
|
|
||||||
|
progress(0.9, desc="Saving...")
|
||||||
|
save_path = save_results(transcription, minutes, meeting_type)
|
||||||
|
|
||||||
|
progress(1.0, desc="Complete!")
|
||||||
|
|
||||||
|
status = f"""Processing completed!
|
||||||
|
|
||||||
|
Transcription: {len(transcription)} characters
|
||||||
|
Minutes: {len(minutes)} characters
|
||||||
|
Saved to: {save_path}
|
||||||
|
|
||||||
|
Models used:
|
||||||
|
- Transcription: {TRANSCRIPTION_MODEL}
|
||||||
|
- LLM: {OLLAMA_MODEL}
|
||||||
|
- Device: {DEVICE}
|
||||||
|
"""
|
||||||
|
|
||||||
|
return transcription, minutes, status
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
progress(1.0, desc="Failed")
|
||||||
|
return "", "", f"Processing failed: {str(e)}"
|
||||||
|
|
||||||
|
def create_interface():
|
||||||
|
with gr.Blocks(title="Meeting Minutes Creator") as interface:
|
||||||
|
|
||||||
|
gr.HTML("<h1>Meeting Minutes Creator</h1><p>HuggingFace Whisper + Ollama</p>")
|
||||||
|
|
||||||
|
with gr.Row():
|
||||||
|
with gr.Column():
|
||||||
|
gr.Markdown("### Audio Input")
|
||||||
|
|
||||||
|
audio_input = gr.Audio(
|
||||||
|
label="Upload or Record Audio",
|
||||||
|
type="filepath",
|
||||||
|
sources=["upload", "microphone"]
|
||||||
|
)
|
||||||
|
|
||||||
|
meeting_type = gr.Dropdown(
|
||||||
|
choices=["meeting", "standup", "interview", "call"],
|
||||||
|
value="meeting",
|
||||||
|
label="Meeting Type"
|
||||||
|
)
|
||||||
|
|
||||||
|
process_btn = gr.Button("Generate Minutes", variant="primary")
|
||||||
|
|
||||||
|
gr.HTML(f"""
|
||||||
|
<div>
|
||||||
|
<h4>Configuration</h4>
|
||||||
|
<ul>
|
||||||
|
<li>Transcription: {TRANSCRIPTION_MODEL}</li>
|
||||||
|
<li>LLM: {OLLAMA_MODEL}</li>
|
||||||
|
<li>Device: {DEVICE}</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
""")
|
||||||
|
|
||||||
|
with gr.Column():
|
||||||
|
gr.Markdown("### Results")
|
||||||
|
|
||||||
|
status_output = gr.Markdown("Ready to process audio")
|
||||||
|
|
||||||
|
with gr.Tabs():
|
||||||
|
with gr.Tab("Meeting Minutes"):
|
||||||
|
minutes_output = gr.Markdown("Minutes will appear here")
|
||||||
|
|
||||||
|
with gr.Tab("Transcription"):
|
||||||
|
transcription_output = gr.Textbox(
|
||||||
|
"Transcription will appear here",
|
||||||
|
lines=15,
|
||||||
|
show_copy_button=True
|
||||||
|
)
|
||||||
|
|
||||||
|
process_btn.click(
|
||||||
|
fn=process_audio_file,
|
||||||
|
inputs=[audio_input, meeting_type],
|
||||||
|
outputs=[transcription_output, minutes_output, status_output],
|
||||||
|
show_progress=True
|
||||||
|
)
|
||||||
|
|
||||||
|
return interface
|
||||||
|
|
||||||
|
# ============================
|
||||||
|
# MAIN APPLICATION
|
||||||
|
# ============================
|
||||||
|
|
||||||
|
def main():
|
||||||
|
print("Meeting Minutes Creator - HuggingFace + Ollama")
|
||||||
|
print("Loading models...")
|
||||||
|
|
||||||
|
transcription_pipe, ollama_ready = load_models()
|
||||||
|
|
||||||
|
if not transcription_pipe or not ollama_ready:
|
||||||
|
print("Failed to load models or connect to Ollama")
|
||||||
|
print("Make sure Ollama is running and has the model available")
|
||||||
|
return
|
||||||
|
|
||||||
|
process_audio_file.models = (transcription_pipe, ollama_ready)
|
||||||
|
|
||||||
|
print("Models loaded successfully!")
|
||||||
|
print("Starting web interface...")
|
||||||
|
print("Access at: http://localhost:7860")
|
||||||
|
|
||||||
|
interface = create_interface()
|
||||||
|
|
||||||
|
try:
|
||||||
|
interface.launch(
|
||||||
|
server_name="localhost",
|
||||||
|
server_port=7860,
|
||||||
|
debug=False
|
||||||
|
)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("Shutting down...")
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Failed to launch: {e}")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
# Meeting Minutes
|
||||||
|
|
||||||
|
**Generated:** 2025-10-24 06:26:09
|
||||||
|
|
||||||
|
## Meeting Minutes
|
||||||
|
|
||||||
|
Here are the meeting minutes based on the transcript:
|
||||||
|
|
||||||
|
**Dilistanda Meeting Minutes - October 24**
|
||||||
|
|
||||||
|
**Attendees:**
|
||||||
|
|
||||||
|
* Jean (Project Manager)
|
||||||
|
* [Unknown speaker] ( attendee, name not provided)
|
||||||
|
|
||||||
|
**Summary:**
|
||||||
|
This meeting was held to discuss ongoing project updates and tasks for Dilistanda. The attendees reviewed the progress made by Jean on the user authentication module and discussed other ongoing work.
|
||||||
|
|
||||||
|
**Key Discussion Points:**
|
||||||
|
|
||||||
|
* Jean shared his update on completing the user authentication module and fixing three bugs on the login system.
|
||||||
|
* [Unknown speaker] mentioned they finished a database migration script and reviewed SORAP or request, but did not provide further details.
|
||||||
|
|
||||||
|
**Important Decisions:**
|
||||||
|
None
|
||||||
|
|
||||||
|
**Action Items:**
|
||||||
|
|
||||||
|
1. **Jean:** Continue working on the dashboard to components without any blockers.
|
||||||
|
2. [Unknown speaker]: Focus on API points for mobile app development.
|
||||||
|
|
||||||
|
Note: Unfortunately, some information was missing from the transcript (e.g., the identity of the second attendee), which made it challenging to create a comprehensive set of meeting minutes.
|
||||||
|
|
||||||
|
## Full Transcription
|
||||||
|
|
||||||
|
Good morning everyone, this is our Dilistanda meeting for October 24. I am sorrow as a project manager. Jean, can you give us your update? Yeah, Jean here yesterday I completed the user authentication module and I fixed three bugs on the login system. Today I will be working on the dashboard to components, no blocker. Okay, so I'm going to make your turn. How is this mic? I finished the database migration script and I reviewed SORAP or request. Today I will focus on the API points for mobile app.
|
||||||
9
week3/community-contributions/salah/requirements.txt
Normal file
9
week3/community-contributions/salah/requirements.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Meeting Minutes Creator V2 - HuggingFace + Ollama Implementation
|
||||||
|
# Requirements for Week 3 Day 5 Exercise
|
||||||
|
|
||||||
|
torch>=2.0.0
|
||||||
|
transformers>=4.35.0
|
||||||
|
gradio>=4.0.0
|
||||||
|
librosa>=0.10.0
|
||||||
|
soundfile>=0.12.0
|
||||||
|
requests>=2.31.0
|
||||||
255
week4/community-contributions/hopeogbons/README.md
Normal file
255
week4/community-contributions/hopeogbons/README.md
Normal file
@@ -0,0 +1,255 @@
|
|||||||
|
# 🔶 Multi-Language Code Complexity Annotator
|
||||||
|
|
||||||
|
An automated tool that analyzes source code and annotates it with Big-O complexity estimates, complete with syntax highlighting and optional AI-powered code reviews.
|
||||||
|
|
||||||
|
## 🎯 What It Does
|
||||||
|
|
||||||
|
Understanding time complexity (Big-O notation) is crucial for writing efficient algorithms, identifying bottlenecks, making informed optimization decisions, and passing technical interviews.
|
||||||
|
|
||||||
|
Analyzing complexity manually is tedious and error-prone. This tool **automates** the entire process—detecting loops, recursion, and functions, then annotating code with Big-O estimates and explanations.
|
||||||
|
|
||||||
|
### Core Features
|
||||||
|
|
||||||
|
- 📊 **Automatic Detection** - Identifies loops, recursion, and functions across 13+ programming languages
|
||||||
|
- 🧮 **Complexity Estimation** - Calculates Big-O complexity (O(1), O(n), O(n²), O(log n), etc.)
|
||||||
|
- 💬 **Inline Annotations** - Inserts explanatory comments directly into your code
|
||||||
|
- 🎨 **Syntax Highlighting** - Generates beautiful HTML previews with orange-colored complexity comments
|
||||||
|
- 🤖 **AI Code Review** - Optional LLaMA-powered analysis for optimization suggestions
|
||||||
|
- 💾 **Export Options** - Download annotated source code and Markdown previews
|
||||||
|
|
||||||
|
## 🌐 Supported Languages
|
||||||
|
|
||||||
|
Python • JavaScript • TypeScript • Java • C • C++ • C# • Go • PHP • Swift • Ruby • Kotlin • Rust
|
||||||
|
|
||||||
|
## 🛠️ Tech Stack
|
||||||
|
|
||||||
|
- **HuggingFace Transformers** - LLM model loading and inference
|
||||||
|
- **LLaMA 3.2** - AI-powered code review
|
||||||
|
- **Gradio** - Interactive web interface
|
||||||
|
- **Pygments** - Syntax highlighting
|
||||||
|
- **PyTorch** - Deep learning framework
|
||||||
|
- **Regex Analysis** - Heuristic complexity detection
|
||||||
|
|
||||||
|
## 📋 Prerequisites
|
||||||
|
|
||||||
|
- Python 3.12+
|
||||||
|
- `uv` package manager (or `pip`)
|
||||||
|
- 4GB+ RAM (for basic use without AI)
|
||||||
|
- 14GB+ RAM (for AI code review with LLaMA models)
|
||||||
|
- Optional: NVIDIA GPU with CUDA (for model quantization)
|
||||||
|
|
||||||
|
## 🚀 Installation
|
||||||
|
|
||||||
|
### 1. Clone the Repository
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd week4
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Install Dependencies
|
||||||
|
|
||||||
|
```bash
|
||||||
|
uv pip install -U pip
|
||||||
|
uv pip install transformers accelerate gradio torch --extra-index-url https://download.pytorch.org/whl/cpu
|
||||||
|
uv pip install bitsandbytes pygments python-dotenv
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Note:** This installs the CPU-only version of PyTorch. For GPU support, remove the `--extra-index-url` flag.
|
||||||
|
|
||||||
|
### 3. Set Up HuggingFace Token (Optional - for AI Features)
|
||||||
|
|
||||||
|
Create a `.env` file in the `week4` directory:
|
||||||
|
|
||||||
|
```env
|
||||||
|
HF_TOKEN=hf_your_token_here
|
||||||
|
```
|
||||||
|
|
||||||
|
Get your token at: https://huggingface.co/settings/tokens
|
||||||
|
|
||||||
|
> **Required for:** LLaMA models (requires accepting Meta's license agreement)
|
||||||
|
|
||||||
|
## 💡 Usage
|
||||||
|
|
||||||
|
### Option 1: Jupyter Notebook
|
||||||
|
|
||||||
|
Open and run `week4 EXERCISE_hopeogbons.ipynb`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
jupyter notebook "week4 EXERCISE_hopeogbons.ipynb"
|
||||||
|
```
|
||||||
|
|
||||||
|
Run all cells in order. The Gradio interface will launch at `http://127.0.0.1:7861`
|
||||||
|
|
||||||
|
### Option 2: Web Interface
|
||||||
|
|
||||||
|
Once the Gradio app is running:
|
||||||
|
|
||||||
|
#### **Without AI Review (No Model Needed)**
|
||||||
|
|
||||||
|
1. Upload a code file (.py, .js, .java, etc.)
|
||||||
|
2. Uncheck "Generate AI Code Review"
|
||||||
|
3. Click "🚀 Process & Annotate"
|
||||||
|
4. View syntax-highlighted code with Big-O annotations
|
||||||
|
5. Download the annotated source + Markdown
|
||||||
|
|
||||||
|
#### **With AI Review (Requires Model)**
|
||||||
|
|
||||||
|
1. Click "🔄 Load Model" (wait 2-5 minutes for first download)
|
||||||
|
2. Upload your code file
|
||||||
|
3. Check "Generate AI Code Review"
|
||||||
|
4. Adjust temperature/tokens if needed
|
||||||
|
5. Click "🚀 Process & Annotate"
|
||||||
|
6. Read AI-generated optimization suggestions
|
||||||
|
|
||||||
|
## 📊 How It Works
|
||||||
|
|
||||||
|
### Complexity Detection Algorithm
|
||||||
|
|
||||||
|
The tool uses **heuristic pattern matching** to estimate Big-O complexity:
|
||||||
|
|
||||||
|
1. **Detect Blocks** - Regex patterns find functions, loops, and recursion
|
||||||
|
2. **Analyze Loops** - Count nesting depth:
|
||||||
|
- 1 loop = O(n)
|
||||||
|
- 2 nested loops = O(n²)
|
||||||
|
- 3 nested loops = O(n³)
|
||||||
|
3. **Analyze Recursion** - Pattern detection:
|
||||||
|
- Divide-and-conquer (binary search) = O(log n)
|
||||||
|
- Single recursive call = O(n)
|
||||||
|
- Multiple recursive calls = O(2^n)
|
||||||
|
4. **Aggregate** - Functions inherit worst-case complexity of inner operations
|
||||||
|
|
||||||
|
### Example Output
|
||||||
|
|
||||||
|
**Input (Python):**
|
||||||
|
|
||||||
|
```python
|
||||||
|
def bubble_sort(arr):
|
||||||
|
for i in range(len(arr)):
|
||||||
|
for j in range(len(arr) - i - 1):
|
||||||
|
if arr[j] > arr[j + 1]:
|
||||||
|
arr[j], arr[j + 1] = arr[j + 1], arr[j]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Output (Annotated):**
|
||||||
|
|
||||||
|
```python
|
||||||
|
def bubble_sort(arr):
|
||||||
|
# Big-O: O(n^2)
|
||||||
|
# Explanation: Nested loops indicate quadratic time.
|
||||||
|
for i in range(len(arr)):
|
||||||
|
for j in range(len(arr) - i - 1):
|
||||||
|
if arr[j] > arr[j + 1]:
|
||||||
|
arr[j], arr[j + 1] = arr[j + 1], arr[j]
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🧠 AI Model Options
|
||||||
|
|
||||||
|
### CPU/Mac (No GPU)
|
||||||
|
|
||||||
|
- `meta-llama/Llama-3.2-1B` (Default, ~1GB, requires HF approval)
|
||||||
|
- `gpt2` (No approval needed, ~500MB)
|
||||||
|
- `microsoft/DialoGPT-medium` (~1GB)
|
||||||
|
|
||||||
|
### GPU Users
|
||||||
|
|
||||||
|
- Any model with 8-bit or 4-bit quantization enabled
|
||||||
|
- `meta-llama/Llama-2-7b-chat-hf` (requires approval)
|
||||||
|
|
||||||
|
### Memory Requirements
|
||||||
|
|
||||||
|
- **Without quantization:** ~14GB RAM (7B models) or ~26GB (13B models)
|
||||||
|
- **With 8-bit quantization:** ~50% reduction (GPU required)
|
||||||
|
- **With 4-bit quantization:** ~75% reduction (GPU required)
|
||||||
|
|
||||||
|
## ⚙️ Configuration
|
||||||
|
|
||||||
|
### File Limits
|
||||||
|
|
||||||
|
- Max file size: **2 MB**
|
||||||
|
- Supported extensions: `.py`, `.js`, `.ts`, `.java`, `.c`, `.cpp`, `.cs`, `.go`, `.php`, `.swift`, `.rb`, `.kt`, `.rs`
|
||||||
|
|
||||||
|
### Model Parameters
|
||||||
|
|
||||||
|
- **Temperature** (0.0 - 1.5): Controls randomness
|
||||||
|
- Lower = more deterministic
|
||||||
|
- Higher = more creative
|
||||||
|
- **Max Tokens** (16 - 1024): Maximum length of AI review
|
||||||
|
|
||||||
|
## 📁 Project Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
week4/
|
||||||
|
├── week4 EXERCISE_hopeogbons.ipynb # Main application notebook
|
||||||
|
├── README.md # This file
|
||||||
|
└── .env # HuggingFace token (create this)
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🐛 Troubleshooting
|
||||||
|
|
||||||
|
### Model Loading Issues
|
||||||
|
|
||||||
|
**Error:** "Model not found" or "Access denied"
|
||||||
|
|
||||||
|
- **Solution:** Accept Meta's license at https://huggingface.co/meta-llama/Llama-3.2-1B
|
||||||
|
- Ensure your `.env` file contains a valid HF_TOKEN
|
||||||
|
|
||||||
|
### Memory Issues
|
||||||
|
|
||||||
|
**Error:** "Out of memory" during model loading
|
||||||
|
|
||||||
|
- **Solution:** Use a smaller model like `gpt2` or `microsoft/DialoGPT-medium`
|
||||||
|
- Try 8-bit or 4-bit quantization (GPU required)
|
||||||
|
|
||||||
|
### Quantization Requires GPU
|
||||||
|
|
||||||
|
**Error:** "Quantization requires CUDA"
|
||||||
|
|
||||||
|
- **Solution:** Disable both 4-bit and 8-bit quantization checkboxes
|
||||||
|
- Run on CPU with smaller models
|
||||||
|
|
||||||
|
### File Upload Issues
|
||||||
|
|
||||||
|
**Error:** "Unsupported file extension"
|
||||||
|
|
||||||
|
- **Solution:** Ensure your file has one of the supported extensions
|
||||||
|
- Check that the file size is under 2MB
|
||||||
|
|
||||||
|
## 🎓 Use Cases
|
||||||
|
|
||||||
|
- **Code Review** - Automated complexity analysis for pull requests
|
||||||
|
- **Interview Prep** - Understand algorithm efficiency before coding interviews
|
||||||
|
- **Performance Optimization** - Identify bottlenecks in existing code
|
||||||
|
- **Education** - Learn Big-O notation through practical examples
|
||||||
|
- **Documentation** - Auto-generate complexity documentation
|
||||||
|
|
||||||
|
## 📝 Notes
|
||||||
|
|
||||||
|
- First model load downloads weights (~1-14GB depending on model)
|
||||||
|
- Subsequent runs load from cache (much faster)
|
||||||
|
- Complexity estimates are heuristic-based, not formally verified
|
||||||
|
- For production use, consider manual verification of critical algorithms
|
||||||
|
|
||||||
|
## 🤝 Contributing
|
||||||
|
|
||||||
|
This is a learning project from the Andela LLM Engineering course (Week 4). Feel free to extend it with:
|
||||||
|
|
||||||
|
- Additional language support
|
||||||
|
- More sophisticated complexity detection
|
||||||
|
- Integration with CI/CD pipelines
|
||||||
|
- Support for space complexity analysis
|
||||||
|
|
||||||
|
## 📄 License
|
||||||
|
|
||||||
|
Educational project - use as reference for learning purposes.
|
||||||
|
|
||||||
|
## 🙏 Acknowledgments
|
||||||
|
|
||||||
|
- **OpenAI Whisper** for inspiration on model integration
|
||||||
|
- **HuggingFace** for providing the Transformers library
|
||||||
|
- **Meta** for LLaMA models
|
||||||
|
- **Gradio** for the excellent UI framework
|
||||||
|
- **Andela** for the LLM Engineering curriculum
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Built with ❤️ as part of Week 4 LLM Engineering coursework**
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Python Function
|
||||||
|
|
||||||
|
# This function takes a list of items and returns all possible pairs of items
|
||||||
|
def all_pairs(items):
|
||||||
|
pairs = []
|
||||||
|
for i in range(len(items)):
|
||||||
|
for j in range(i + 1, len(items)):
|
||||||
|
pairs.append((items[i], items[j]))
|
||||||
|
return pairs
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
|||||||
|
OPENROUTER_API_KEY=your-api-key-here
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import gradio as gr
|
||||||
|
from test_generator import generate_tests
|
||||||
|
|
||||||
|
def create_interface():
|
||||||
|
with gr.Blocks(title="Unit Test Generator") as ui:
|
||||||
|
gr.Markdown("# Unit Test Generator")
|
||||||
|
gr.Markdown("Paste your Python code and get AI-generated unit tests")
|
||||||
|
|
||||||
|
with gr.Row():
|
||||||
|
with gr.Column(scale=1):
|
||||||
|
code_input = gr.Code(
|
||||||
|
label="Your Code",
|
||||||
|
language="python",
|
||||||
|
lines=15
|
||||||
|
)
|
||||||
|
generate_btn = gr.Button("Generate Tests", variant="primary")
|
||||||
|
|
||||||
|
with gr.Column(scale=1):
|
||||||
|
tests_output = gr.Textbox(
|
||||||
|
label="Generated Tests",
|
||||||
|
lines=15,
|
||||||
|
interactive=False
|
||||||
|
)
|
||||||
|
|
||||||
|
generate_btn.click(
|
||||||
|
fn=generate_tests,
|
||||||
|
inputs=[code_input],
|
||||||
|
outputs=[tests_output]
|
||||||
|
)
|
||||||
|
|
||||||
|
return ui
|
||||||
|
|
||||||
|
def launch():
|
||||||
|
ui = create_interface()
|
||||||
|
ui.launch(server_name="localhost", server_port=7860)
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
from dotenv import load_dotenv
|
||||||
|
from app import launch
|
||||||
|
|
||||||
|
load_dotenv()
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
api_key = os.getenv("OPENROUTER_API_KEY")
|
||||||
|
if not api_key:
|
||||||
|
print("Error: OPENROUTER_API_KEY not set in .env")
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
print("Starting Unit Test Generator...")
|
||||||
|
print("Open http://localhost:7860 in your browser")
|
||||||
|
launch()
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
import os
|
||||||
|
from openai import OpenAI
|
||||||
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
|
load_dotenv()
|
||||||
|
|
||||||
|
client = OpenAI(
|
||||||
|
api_key=os.getenv("OPENROUTER_API_KEY"),
|
||||||
|
base_url="https://openrouter.ai/api/v1"
|
||||||
|
)
|
||||||
|
|
||||||
|
MODEL = os.getenv("SECURECODE_MODEL", "meta-llama/llama-3.1-8b-instruct:free")
|
||||||
|
|
||||||
|
SYSTEM_PROMPT = """You are a Python testing expert.
|
||||||
|
Generate pytest unit tests for the given code.
|
||||||
|
Include:
|
||||||
|
- Happy path tests
|
||||||
|
- Edge cases
|
||||||
|
- Error handling tests
|
||||||
|
Keep tests simple and clear."""
|
||||||
|
|
||||||
|
def generate_tests(code):
|
||||||
|
"""Generate unit tests for the given code."""
|
||||||
|
try:
|
||||||
|
response = client.chat.completions.create(
|
||||||
|
model=MODEL,
|
||||||
|
messages=[
|
||||||
|
{"role": "system", "content": SYSTEM_PROMPT},
|
||||||
|
{"role": "user", "content": f"Generate tests for this code:\n\n{code}"}
|
||||||
|
],
|
||||||
|
stream=True
|
||||||
|
)
|
||||||
|
|
||||||
|
result = ""
|
||||||
|
for chunk in response:
|
||||||
|
if chunk.choices[0].delta.content:
|
||||||
|
result += chunk.choices[0].delta.content
|
||||||
|
yield result
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
yield f"Error: {str(e)}"
|
||||||
@@ -47,21 +47,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 1,
|
"execution_count": null,
|
||||||
"id": "a9aeb363",
|
"id": "a9aeb363",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"OpenAI API Key exists and begins sk-proj-\n",
|
|
||||||
"Anthropic API Key exists and begins sk-ant-\n",
|
|
||||||
"Google API Key exists and begins AI\n",
|
|
||||||
"OLLAMA API Key exists and begins 36\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"# imports\n",
|
"# imports\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -120,7 +109,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 2,
|
"execution_count": null,
|
||||||
"id": "2e250912",
|
"id": "2e250912",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -144,7 +133,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 3,
|
"execution_count": null,
|
||||||
"id": "1f67fdb3",
|
"id": "1f67fdb3",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -200,7 +189,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 5,
|
"execution_count": null,
|
||||||
"id": "cec185e3",
|
"id": "cec185e3",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -292,18 +281,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 51,
|
"execution_count": null,
|
||||||
"id": "be31f352",
|
"id": "be31f352",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"now\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"mails_2 = generate_synthetic_emails(\n",
|
"mails_2 = generate_synthetic_emails(\n",
|
||||||
" persona_description = persona_description,\n",
|
" persona_description = persona_description,\n",
|
||||||
@@ -316,18 +297,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 52,
|
"execution_count": null,
|
||||||
"id": "24d844f2",
|
"id": "24d844f2",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"Saved 101 emails to emails2.json\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"save_emails_to_json(mails_2, 'emails2.json')"
|
"save_emails_to_json(mails_2, 'emails2.json')"
|
||||||
]
|
]
|
||||||
@@ -343,7 +316,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 6,
|
"execution_count": null,
|
||||||
"id": "777012f8",
|
"id": "777012f8",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -371,19 +344,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 38,
|
"execution_count": null,
|
||||||
"id": "ce95d9c7",
|
"id": "ce95d9c7",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"Total number of chunks: 206\n",
|
|
||||||
"Sample metadata fields: ['sender', 'timestamp', 'category']\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"# Read in emails from the emails.json file and construct LangChain documents\n",
|
"# Read in emails from the emails.json file and construct LangChain documents\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -427,7 +391,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 44,
|
"execution_count": null,
|
||||||
"id": "a99dd2d6",
|
"id": "a99dd2d6",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -474,7 +438,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 45,
|
"execution_count": null,
|
||||||
"id": "161144ac",
|
"id": "161144ac",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -503,58 +467,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 60,
|
"execution_count": null,
|
||||||
"id": "16a4d8d1",
|
"id": "16a4d8d1",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [],
|
||||||
{
|
|
||||||
"name": "stderr",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"c:\\Users\\Javi\\Desktop\\course\\llm_engineering\\.venv\\Lib\\site-packages\\gradio\\chat_interface.py:347: UserWarning:\n",
|
|
||||||
"\n",
|
|
||||||
"The 'tuples' format for chatbot messages is deprecated and will be removed in a future version of Gradio. Please set type='messages' instead, which uses openai-style 'role' and 'content' keys.\n",
|
|
||||||
"\n"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"Warning: When cdn_resources is 'local' jupyter notebook has issues displaying graphics on chrome/safari. Use cdn_resources='in_line' or cdn_resources='remote' if you have issues viewing graphics in a notebook.\n",
|
|
||||||
"* Running on local URL: http://127.0.0.1:7878\n",
|
|
||||||
"* To create a public link, set `share=True` in `launch()`.\n"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/html": [
|
|
||||||
"<div><iframe src=\"http://127.0.0.1:7878/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
|
|
||||||
],
|
|
||||||
"text/plain": [
|
|
||||||
"<IPython.core.display.HTML object>"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "display_data"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"text/plain": []
|
|
||||||
},
|
|
||||||
"execution_count": 60,
|
|
||||||
"metadata": {},
|
|
||||||
"output_type": "execute_result"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "stdout",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"Warning: When cdn_resources is 'local' jupyter notebook has issues displaying graphics on chrome/safari. Use cdn_resources='in_line' or cdn_resources='remote' if you have issues viewing graphics in a notebook.\n",
|
|
||||||
"Warning: When cdn_resources is 'local' jupyter notebook has issues displaying graphics on chrome/safari. Use cdn_resources='in_line' or cdn_resources='remote' if you have issues viewing graphics in a notebook.\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
"source": [
|
||||||
"\n",
|
"\n",
|
||||||
"import gradio as gr\n",
|
"import gradio as gr\n",
|
||||||
@@ -589,14 +505,6 @@
|
|||||||
"demo.launch(inbrowser=True)\n",
|
"demo.launch(inbrowser=True)\n",
|
||||||
"\n"
|
"\n"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": null,
|
|
||||||
"id": "221a9d98",
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [],
|
|
||||||
"source": []
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
|
|||||||
4
week6/community-contributions/kachaje-andelaGenAi-bootcamp/.gitignore
vendored
Normal file
4
week6/community-contributions/kachaje-andelaGenAi-bootcamp/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
items.py
|
||||||
|
loaders.py
|
||||||
|
llama32_pricer_lora/
|
||||||
|
testing.py
|
||||||
@@ -0,0 +1,347 @@
|
|||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# Fine-tune Llama 3.2 1B Locally with LoRA\n",
|
||||||
|
"\n",
|
||||||
|
"This notebook fine-tunes Llama 3.2 1B model for product pricing using Low-Rank Adaptation (LoRA), which is memory-efficient and suitable for local training.\n",
|
||||||
|
"\n",
|
||||||
|
"**macOS Compatibility:** This notebook uses Hugging Face transformers and PEFT (instead of Unsloth) for better macOS compatibility. Works on CPU, Apple Silicon (Metal), or NVIDIA GPU.\n",
|
||||||
|
"\n",
|
||||||
|
"**Optimizations:**\n",
|
||||||
|
"- LoRA for memory-efficient fine-tuning (only ~1% of parameters trained)\n",
|
||||||
|
"- bfloat16 mixed precision training when available\n",
|
||||||
|
"- Gradient checkpointing for additional memory savings\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Install PyTorch first (required for other packages on macOS ARM64)\n",
|
||||||
|
"! uv pip -q install torch torchvision torchaudio\n",
|
||||||
|
"\n",
|
||||||
|
"# Install required packages for fine-tuning with LoRA (works on macOS without GPU)\n",
|
||||||
|
"! uv pip -q install trl peft accelerate datasets transformers"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Imports\n",
|
||||||
|
"import os\n",
|
||||||
|
"os.environ[\"TOKENIZERS_PARALLELISM\"] = \"false\"\n",
|
||||||
|
"\n",
|
||||||
|
"import re\n",
|
||||||
|
"import json\n",
|
||||||
|
"import pickle\n",
|
||||||
|
"from transformers import AutoModelForCausalLM, AutoTokenizer, TrainingArguments\n",
|
||||||
|
"from peft import LoraConfig, get_peft_model, TaskType\n",
|
||||||
|
"from datasets import Dataset\n",
|
||||||
|
"import torch\n",
|
||||||
|
"from items import Item\n",
|
||||||
|
"from testing import Tester\n",
|
||||||
|
"\n",
|
||||||
|
"# Import SFTTrainer - try SFTConfig if available, otherwise use old API\n",
|
||||||
|
"try:\n",
|
||||||
|
" from trl import SFTTrainer, SFTConfig\n",
|
||||||
|
" USE_SFT_CONFIG = True\n",
|
||||||
|
"except ImportError:\n",
|
||||||
|
" from trl import SFTTrainer\n",
|
||||||
|
" USE_SFT_CONFIG = False\n",
|
||||||
|
" print(\"Note: Using older TRL API without SFTConfig\")\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Load Training Data\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Load the training and test datasets\n",
|
||||||
|
"with open('train_lite.pkl', 'rb') as f:\n",
|
||||||
|
" train_data = pickle.load(f)\n",
|
||||||
|
"\n",
|
||||||
|
"with open('test_lite.pkl', 'rb') as f:\n",
|
||||||
|
" test_data = pickle.load(f)\n",
|
||||||
|
"\n",
|
||||||
|
"print(f\"Training samples: {len(train_data)}\")\n",
|
||||||
|
"print(f\"Test samples: {len(test_data)}\")\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Convert Data to Chat Format\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def messages_for(item):\n",
|
||||||
|
" \"\"\"Convert item to chat format for fine-tuning\"\"\"\n",
|
||||||
|
" system_message = \"You estimate prices of items. Reply only with the price, no explanation\"\n",
|
||||||
|
" user_prompt = item.test_prompt().replace(\" to the nearest dollar\",\"\").replace(\"\\n\\nPrice is $\",\"\")\n",
|
||||||
|
" return [\n",
|
||||||
|
" {\"role\": \"system\", \"content\": system_message},\n",
|
||||||
|
" {\"role\": \"user\", \"content\": user_prompt},\n",
|
||||||
|
" {\"role\": \"assistant\", \"content\": f\"Price is ${item.price:.2f}\"}\n",
|
||||||
|
" ]\n",
|
||||||
|
"\n",
|
||||||
|
"# Convert to chat format\n",
|
||||||
|
"def format_for_training(items):\n",
|
||||||
|
" texts = []\n",
|
||||||
|
" for item in items:\n",
|
||||||
|
" messages = messages_for(item)\n",
|
||||||
|
" # Format as instruction following format for unsloth\n",
|
||||||
|
" text = f\"### System:\\n{messages[0]['content']}\\n\\n### User:\\n{messages[1]['content']}\\n\\n### Assistant:\\n{messages[2]['content']}\"\n",
|
||||||
|
" texts.append(text)\n",
|
||||||
|
" return texts\n",
|
||||||
|
"\n",
|
||||||
|
"train_texts = format_for_training(train_data)\n",
|
||||||
|
"print(f\"Example training text:\\n{train_texts[0]}\")\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Create dataset\n",
|
||||||
|
"train_dataset = Dataset.from_dict({\"text\": train_texts})\n",
|
||||||
|
"print(f\"Dataset created with {len(train_dataset)} samples\")\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Load Model with LoRA Configuration\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Load model and tokenizer\n",
|
||||||
|
"model_name = \"unsloth/Llama-3.2-1B-Instruct\"\n",
|
||||||
|
"tokenizer = AutoTokenizer.from_pretrained(model_name)\n",
|
||||||
|
"tokenizer.pad_token = tokenizer.eos_token\n",
|
||||||
|
"tokenizer.padding_side = \"right\"\n",
|
||||||
|
"\n",
|
||||||
|
"# Check if CUDA is available (won't be on macOS without GPU)\n",
|
||||||
|
"device_map = \"auto\" if torch.cuda.is_available() else None\n",
|
||||||
|
"\n",
|
||||||
|
"# Load model (use dtype=bfloat16 for Apple Silicon)\n",
|
||||||
|
"model = AutoModelForCausalLM.from_pretrained(\n",
|
||||||
|
" model_name,\n",
|
||||||
|
" dtype=torch.bfloat16 if torch.backends.mps.is_available() else torch.float32,\n",
|
||||||
|
" device_map=device_map,\n",
|
||||||
|
")\n",
|
||||||
|
"\n",
|
||||||
|
"# Configure LoRA\n",
|
||||||
|
"lora_config = LoraConfig(\n",
|
||||||
|
" task_type=TaskType.CAUSAL_LM,\n",
|
||||||
|
" r=16,\n",
|
||||||
|
" lora_alpha=16,\n",
|
||||||
|
" lora_dropout=0.1,\n",
|
||||||
|
" bias=\"none\",\n",
|
||||||
|
" target_modules=[\"q_proj\", \"k_proj\", \"v_proj\", \"o_proj\",\n",
|
||||||
|
" \"gate_proj\", \"up_proj\", \"down_proj\"],\n",
|
||||||
|
")\n",
|
||||||
|
"\n",
|
||||||
|
"# Add LoRA adapters\n",
|
||||||
|
"model = get_peft_model(model, lora_config)\n",
|
||||||
|
"model.print_trainable_parameters()\n",
|
||||||
|
"\n",
|
||||||
|
"# Attach tokenizer to model for SFTTrainer\n",
|
||||||
|
"model.tokenizer = tokenizer\n",
|
||||||
|
"\n",
|
||||||
|
"print(\"Model loaded with LoRA adapters\")\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Configure Training Arguments\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Configure training arguments\n",
|
||||||
|
"training_args = TrainingArguments(\n",
|
||||||
|
" output_dir=\"./llama32_pricer_lora\",\n",
|
||||||
|
" per_device_train_batch_size=2,\n",
|
||||||
|
" gradient_accumulation_steps=4,\n",
|
||||||
|
" warmup_steps=10,\n",
|
||||||
|
" max_steps=100, # Adjust based on dataset size\n",
|
||||||
|
" learning_rate=2e-4,\n",
|
||||||
|
" bf16=torch.backends.mps.is_available() or torch.cuda.is_available(), # Use bf16 if available\n",
|
||||||
|
" logging_steps=10,\n",
|
||||||
|
" save_strategy=\"steps\",\n",
|
||||||
|
" save_steps=25,\n",
|
||||||
|
" eval_steps=25,\n",
|
||||||
|
" save_total_limit=2,\n",
|
||||||
|
" load_best_model_at_end=False,\n",
|
||||||
|
")\n",
|
||||||
|
"\n",
|
||||||
|
"print(\"Training arguments configured\")\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Initialize Trainer and Start Fine-tuning\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Initialize trainer\n",
|
||||||
|
"# Model is already wrapped with PEFT (LoRA), so we use basic parameters\n",
|
||||||
|
"trainer = SFTTrainer(\n",
|
||||||
|
" model=model,\n",
|
||||||
|
" train_dataset=train_dataset,\n",
|
||||||
|
" args=training_args,\n",
|
||||||
|
")\n",
|
||||||
|
"\n",
|
||||||
|
"print(\"Trainer initialized\")\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Train the model\n",
|
||||||
|
"trainer.train()\n",
|
||||||
|
"print(\"Training completed!\")\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Save the Fine-tuned Model\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Save the model\n",
|
||||||
|
"model.save_pretrained(\"llama32_pricer_lora\")\n",
|
||||||
|
"tokenizer.save_pretrained(\"llama32_pricer_lora\")\n",
|
||||||
|
"print(\"Model saved to llama32_pricer_lora/\")\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Test the Fine-tuned Model\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Helper function to extract price from response\n",
|
||||||
|
"def get_price(s):\n",
|
||||||
|
" s = s.replace('$','').replace(',','')\n",
|
||||||
|
" match = re.search(r\"[-+]?\\d*\\.\\d+|\\d+\", s)\n",
|
||||||
|
" return float(match.group()) if match else 0\n",
|
||||||
|
"\n",
|
||||||
|
"# Function to test the fine-tuned model\n",
|
||||||
|
"def llama32_finetuned_model(item):\n",
|
||||||
|
" messages = messages_for(item)\n",
|
||||||
|
" \n",
|
||||||
|
" # Format the prompt\n",
|
||||||
|
" prompt = f\"### System:\\n{messages[0]['content']}\\n\\n### User:\\n{messages[1]['content']}\\n\\n### Assistant:\\n\"\n",
|
||||||
|
" \n",
|
||||||
|
" # Move to appropriate device\n",
|
||||||
|
" device = next(model.parameters()).device\n",
|
||||||
|
" inputs = tokenizer(prompt, return_tensors=\"pt\").to(device)\n",
|
||||||
|
" \n",
|
||||||
|
" with torch.no_grad():\n",
|
||||||
|
" outputs = model.generate(\n",
|
||||||
|
" **inputs,\n",
|
||||||
|
" max_new_tokens=50,\n",
|
||||||
|
" temperature=0.1,\n",
|
||||||
|
" do_sample=True,\n",
|
||||||
|
" pad_token_id=tokenizer.eos_token_id\n",
|
||||||
|
" )\n",
|
||||||
|
" \n",
|
||||||
|
" response = tokenizer.decode(outputs[0][inputs[\"input_ids\"].shape[1]:], skip_special_tokens=True)\n",
|
||||||
|
" return get_price(response)\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Test on the test dataset\n",
|
||||||
|
"print(\"Testing fine-tuned model...\")\n",
|
||||||
|
"Tester.test(llama32_finetuned_model, test_data)\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"kernelspec": {
|
||||||
|
"display_name": "Python 3",
|
||||||
|
"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.12.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 2
|
||||||
|
}
|
||||||
@@ -0,0 +1,512 @@
|
|||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "a246687d",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# The Product Pricer\n",
|
||||||
|
"\n",
|
||||||
|
"A model that can estimate how much something costs, from its description\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "3792ce5b",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"! uv -q pip install langchain-ollama"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "390c3ce3",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# imports\n",
|
||||||
|
"\n",
|
||||||
|
"import os\n",
|
||||||
|
"os.environ[\"TOKENIZERS_PARALLELISM\"] = \"false\"\n",
|
||||||
|
"\n",
|
||||||
|
"from dotenv import load_dotenv\n",
|
||||||
|
"from huggingface_hub import login\n",
|
||||||
|
"from datasets import load_dataset, Dataset, DatasetDict\n",
|
||||||
|
"import matplotlib.pyplot as plt\n",
|
||||||
|
"import pickle\n",
|
||||||
|
"import re\n",
|
||||||
|
"from langchain_ollama import OllamaLLM\n",
|
||||||
|
"from openai import OpenAI\n",
|
||||||
|
"from testing import Tester\n",
|
||||||
|
"import json\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "8a8ff331",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"load_dotenv(override=True)\n",
|
||||||
|
"hf_token = os.getenv(\"HF_TOKEN\")\n",
|
||||||
|
"login(hf_token, add_to_git_credential=True)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "1051e21e",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"from items import Item\n",
|
||||||
|
"from loaders import ItemLoader\n",
|
||||||
|
"\n",
|
||||||
|
"%matplotlib inline"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "290fa868",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"dataset_names = [\n",
|
||||||
|
" \"Appliances\",\n",
|
||||||
|
"]"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "12ffad66",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"items = []\n",
|
||||||
|
"for dataset_name in dataset_names:\n",
|
||||||
|
" loader = ItemLoader(dataset_name)\n",
|
||||||
|
" items.extend(loader.load())"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "0b3890d7",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"print(f\"A grand total of {len(items):,} items\")"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "246ab22a",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Plot the distribution of token counts again\n",
|
||||||
|
"\n",
|
||||||
|
"tokens = [item.token_count for item in items]\n",
|
||||||
|
"plt.figure(figsize=(15, 6))\n",
|
||||||
|
"plt.title(f\"Token counts: Avg {sum(tokens)/len(tokens):,.1f} and highest {max(tokens):,}\\n\")\n",
|
||||||
|
"plt.xlabel('Length (tokens)')\n",
|
||||||
|
"plt.ylabel('Count')\n",
|
||||||
|
"plt.hist(tokens, rwidth=0.7, color=\"skyblue\", bins=range(0, 300, 10))\n",
|
||||||
|
"plt.show()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "3a49a4d4",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Plot the distribution of prices\n",
|
||||||
|
"\n",
|
||||||
|
"prices = [item.price for item in items]\n",
|
||||||
|
"plt.figure(figsize=(15, 6))\n",
|
||||||
|
"plt.title(f\"Prices: Avg {sum(prices)/len(prices):,.1f} and highest {max(prices):,}\\n\")\n",
|
||||||
|
"plt.xlabel('Price ($)')\n",
|
||||||
|
"plt.ylabel('Count')\n",
|
||||||
|
"plt.hist(prices, rwidth=0.7, color=\"blueviolet\", bins=range(0, 1000, 10))\n",
|
||||||
|
"plt.show()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "57e4ea1b",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# How does the price vary with the character count of the prompt?\n",
|
||||||
|
"\n",
|
||||||
|
"sample = items\n",
|
||||||
|
"\n",
|
||||||
|
"sizes = [len(item.prompt) for item in sample]\n",
|
||||||
|
"prices = [item.price for item in sample]\n",
|
||||||
|
"\n",
|
||||||
|
"# Create the scatter plot\n",
|
||||||
|
"plt.figure(figsize=(15, 8))\n",
|
||||||
|
"plt.scatter(sizes, prices, s=0.2, color=\"red\")\n",
|
||||||
|
"\n",
|
||||||
|
"# Add labels and title\n",
|
||||||
|
"plt.xlabel('Size')\n",
|
||||||
|
"plt.ylabel('Price')\n",
|
||||||
|
"plt.title('Is there a simple correlation?')\n",
|
||||||
|
"\n",
|
||||||
|
"# Display the plot\n",
|
||||||
|
"plt.show()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "e6620daa",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def report(item):\n",
|
||||||
|
" prompt = item.prompt\n",
|
||||||
|
" tokens = Item.tokenizer.encode(item.prompt)\n",
|
||||||
|
" print(prompt)\n",
|
||||||
|
" print(tokens[-10:])\n",
|
||||||
|
" print(Item.tokenizer.batch_decode(tokens[-10:]))"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "af71d177",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"report(sample[50])"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "75ab3c21",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import random\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"random.seed(42)\n",
|
||||||
|
"random.shuffle(sample)\n",
|
||||||
|
"train = sample[:25_000]\n",
|
||||||
|
"test = sample[25_000:27_000]\n",
|
||||||
|
"print(f\"Divided into a training set of {len(train):,} items and test set of {len(test):,} items\")"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "6d5cbd3a",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"print(train[0].prompt)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "39de86d6",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"print(test[0].test_prompt())"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "65480df9",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Plot the distribution of prices in the first 250 test points\n",
|
||||||
|
"\n",
|
||||||
|
"prices = [float(item.price) for item in test[:250]]\n",
|
||||||
|
"plt.figure(figsize=(15, 6))\n",
|
||||||
|
"plt.title(f\"Avg {sum(prices)/len(prices):.2f} and highest {max(prices):,.2f}\\n\")\n",
|
||||||
|
"plt.xlabel('Price ($)')\n",
|
||||||
|
"plt.ylabel('Count')\n",
|
||||||
|
"plt.hist(prices, rwidth=0.7, color=\"darkblue\", bins=range(0, 1000, 10))\n",
|
||||||
|
"plt.show()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "7a315b10",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"filtered_prices = [float(item.price) for item in test if item.price > 99.999]"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "5693c9c6",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"### Confirm that the tokenizer tokenizes all 3 digit prices into 1 token"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "99e8cfc3",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"for price in filtered_prices:\n",
|
||||||
|
" tokens = Item.tokenizer.encode(f\"{price}\", add_special_tokens=False)\n",
|
||||||
|
" assert len(tokens) == 3\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "f3159195",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Helpers"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "7bdc5dd5",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def messages_for(item):\n",
|
||||||
|
" system_message = \"You estimate prices of items. Reply only with the price, no explanation\"\n",
|
||||||
|
" user_prompt = item.test_prompt().replace(\" to the nearest dollar\",\"\").replace(\"\\n\\nPrice is $\",\"\")\n",
|
||||||
|
" return [\n",
|
||||||
|
" {\"role\": \"system\", \"content\": system_message},\n",
|
||||||
|
" {\"role\": \"user\", \"content\": user_prompt},\n",
|
||||||
|
" {\"role\": \"assistant\", \"content\": \"Price is $\"}\n",
|
||||||
|
" ]"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "211b0658",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# A utility function to extract the price from a string\n",
|
||||||
|
"\n",
|
||||||
|
"def get_price(s):\n",
|
||||||
|
" s = s.replace('$','').replace(',','')\n",
|
||||||
|
" match = re.search(r\"[-+]?\\d*\\.\\d+|\\d+\", s)\n",
|
||||||
|
" return float(match.group()) if match else 0"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "ee01da84",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Convert the items into a list of json objects - a \"jsonl\" string\n",
|
||||||
|
"# Each row represents a message in the form:\n",
|
||||||
|
"# {\"messages\" : [{\"role\": \"system\", \"content\": \"You estimate prices...\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"def make_jsonl(items):\n",
|
||||||
|
" result = \"\"\n",
|
||||||
|
" for item in items:\n",
|
||||||
|
" messages = messages_for(item)\n",
|
||||||
|
" messages_str = json.dumps(messages)\n",
|
||||||
|
" result += '{\"messages\": ' + messages_str +'}\\n'\n",
|
||||||
|
" return result.strip()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "f23e8959",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Convert the items into jsonl and write them to a file\n",
|
||||||
|
"\n",
|
||||||
|
"def write_jsonl(items, filename):\n",
|
||||||
|
" with open(filename, \"w\") as f:\n",
|
||||||
|
" jsonl = make_jsonl(items)\n",
|
||||||
|
" f.write(jsonl)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "b6a83580",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Load data"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "451b974f",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"with open('train_lite.pkl', 'rb') as f:\n",
|
||||||
|
" train_lite = pickle.load(f)\n",
|
||||||
|
"\n",
|
||||||
|
"with open('test_lite.pkl', 'rb') as f:\n",
|
||||||
|
" test_lite = pickle.load(f)\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "f365d65c",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"messages_for(test_lite[0])"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "57b0b160",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"get_price(\"The price is roughly $99.99 because blah blah\")"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "ff3e4670",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Models"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "9f62c94b",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"MODEL_LLAMA3_2 = \"llama3.2\"\n",
|
||||||
|
"MODEL_MISTRAL = \"mistral\"\n",
|
||||||
|
"MODEL_TINY_LLAMA = \"tinyllama\"\n",
|
||||||
|
"\n",
|
||||||
|
"llm3_2 = OllamaLLM(model=MODEL_LLAMA3_2)\n",
|
||||||
|
"llmMistral = OllamaLLM(model=MODEL_MISTRAL)\n",
|
||||||
|
"llmTinyLlama = OllamaLLM(model=MODEL_TINY_LLAMA)\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "d18394fb",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Model Tests"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "7dac335f",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def llama3_2_model(item):\n",
|
||||||
|
" response = llm3_2.invoke(messages_for(item))\n",
|
||||||
|
" return get_price(response)\n",
|
||||||
|
"\n",
|
||||||
|
"def mistral_model(item):\n",
|
||||||
|
" response = llmMistral.invoke(messages_for(item))\n",
|
||||||
|
" return get_price(response)\n",
|
||||||
|
"\n",
|
||||||
|
"def tinyllama_model(item):\n",
|
||||||
|
" response = llmTinyLlama.invoke(messages_for(item))\n",
|
||||||
|
" return get_price(response)\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "062e78c2",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"test_lite[0].price"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "c58756f2",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"Tester.test(llama3_2_model, test_lite)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "899e2401",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"Tester.test(mistral_model, test_lite)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "2f5bc9ad",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"Tester.test(tinyllama_model, test_lite)"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"kernelspec": {
|
||||||
|
"display_name": "Python 3",
|
||||||
|
"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.12.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 5
|
||||||
|
}
|
||||||
@@ -0,0 +1,577 @@
|
|||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "8153067f",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import sys\n",
|
||||||
|
"sys.path.append(\"../..\")\n",
|
||||||
|
"\n",
|
||||||
|
"import os\n",
|
||||||
|
"import pickle\n",
|
||||||
|
"import json\n",
|
||||||
|
"from openai import OpenAI\n",
|
||||||
|
"from items import Item\n",
|
||||||
|
"import tiktoken\n",
|
||||||
|
"from dotenv import load_dotenv\n",
|
||||||
|
"import math\n",
|
||||||
|
"import matplotlib.pyplot as plt\n",
|
||||||
|
"from huggingface_hub import login\n",
|
||||||
|
"from datasets import load_dataset, Dataset, DatasetDict\n",
|
||||||
|
"from transformers import AutoTokenizer\n",
|
||||||
|
"import matplotlib.pyplot as plt\n",
|
||||||
|
"import pandas as pd\n",
|
||||||
|
"import numpy as np\n",
|
||||||
|
"import ast"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "939441c1",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"load_dotenv(override=True)\n",
|
||||||
|
"os.environ['OPENAI_API_KEY'] = os.getenv('OPENAI_API_KEY')\n",
|
||||||
|
"os.environ['HF_TOKEN'] = os.getenv('HF_TOKEN')\n",
|
||||||
|
"\n",
|
||||||
|
"OUTLIER_EXECUTED = False\n",
|
||||||
|
"BASE_MODEL = \"meta-llama/Meta-Llama-3.1-8B\"\n",
|
||||||
|
"\n",
|
||||||
|
"# This is the my fine-tuned model you can use it or decide to train your own\n",
|
||||||
|
"FINE_TUNED_MODEL = \"ft:gpt-4o-mini-2024-07-18:quicksearch-plus::CV6dqS5l\"\n",
|
||||||
|
"GREEN = \"\\033[92m\"\n",
|
||||||
|
"YELLOW = \"\\033[93m\"\n",
|
||||||
|
"RED = \"\\033[91m\"\n",
|
||||||
|
"RESET = \"\\033[0m\"\n",
|
||||||
|
"COLOR_MAP = {\"red\": RED, \"orange\": YELLOW, \"green\": GREEN}"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "7ce01a10",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"hf_token = os.environ['HF_TOKEN']\n",
|
||||||
|
"login(hf_token, add_to_git_credential=True)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "9c9e57b0",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"dataset = load_dataset(\"McAuley-Lab/Amazon-Reviews-2023\", f\"raw_meta_Appliances\", split=\"full\", trust_remote_code=True)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "64670e7f",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"data = pd.DataFrame(dataset,columns=[\"main_category\", \"title\", \"description\", \"features\", \"details\", \"price\"])"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "e2c34577",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"data[\"title\"] = data[\"title\"].apply(str)\n",
|
||||||
|
"data[\"description\"] = data[\"description\"].apply(str)\n",
|
||||||
|
"data[\"features\"] = data[\"features\"].apply(str)\n",
|
||||||
|
"\n",
|
||||||
|
"# Replace \"None\" and [] with None \n",
|
||||||
|
"data[\"price\"] = data[\"price\"].replace(\"None\", None)\n",
|
||||||
|
"data[\"title\"] = data[\"title\"].replace(\"\", None)\n",
|
||||||
|
"data[\"description\"] = data[\"description\"].replace(\"[]\", None)\n",
|
||||||
|
"data[\"features\"] = data[\"features\"].replace(\"[]\", None)\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "f99208b5",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"data = data.dropna()\n",
|
||||||
|
"data[\"price\"] = data[\"price\"].apply(float)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "7c42b5c9",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"data = data.drop_duplicates(subset=[\"title\", \"description\",\"price\"])\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "73856ce5",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Handle outliers\n",
|
||||||
|
"# To do that we use the interquartile range\n",
|
||||||
|
"# First we need to calculate the first and third quartiles\n",
|
||||||
|
"# Make sure to run this just once \n",
|
||||||
|
"\n",
|
||||||
|
"q1 = data[\"price\"].quantile(0.25)\n",
|
||||||
|
"q3 = data[\"price\"].quantile(0.75)\n",
|
||||||
|
"iqr = q3 - q1\n",
|
||||||
|
"\n",
|
||||||
|
"lower_bound = q1 - 1.5 * iqr\n",
|
||||||
|
"higher_bound = q3 + 1.5 * iqr\n",
|
||||||
|
"\n",
|
||||||
|
"if not OUTLIER_EXECUTED:\n",
|
||||||
|
" OUTLIER_EXECUTED = True\n",
|
||||||
|
" data = data[(data[\"price\"] >= lower_bound) & (data[\"price\"] <= higher_bound) & (data[\"price\"] > 0)]\n",
|
||||||
|
"else:\n",
|
||||||
|
" print(\"Outlier already executed\")\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "567b9e4b",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"#Further cleansing of the data (dealing with lists and dicts)\n",
|
||||||
|
"def clean_list_string(field):\n",
|
||||||
|
" \"\"\"Convert string representation of list to clean string\"\"\"\n",
|
||||||
|
" try:\n",
|
||||||
|
" # Try to parse as literal list\n",
|
||||||
|
" if field.startswith('[') and field.endswith(']'):\n",
|
||||||
|
" parsed = ast.literal_eval(field)\n",
|
||||||
|
" return ' '.join(str(item) for item in parsed)\n",
|
||||||
|
" except:\n",
|
||||||
|
" pass\n",
|
||||||
|
" return str(field)\n",
|
||||||
|
"\n",
|
||||||
|
"def clean_dict_string(field):\n",
|
||||||
|
" \"\"\"Convert string representation of dict to clean string\"\"\"\n",
|
||||||
|
" try:\n",
|
||||||
|
" # Try to parse as literal dict\n",
|
||||||
|
" if field.startswith('{') and field.endswith('}'):\n",
|
||||||
|
" parsed = ast.literal_eval(field)\n",
|
||||||
|
" parts = []\n",
|
||||||
|
" for key, value in parsed.items():\n",
|
||||||
|
" if isinstance(value, dict):\n",
|
||||||
|
" value = ', '.join(f\"{k}: {v}\" for k, v in value.items())\n",
|
||||||
|
" parts.append(f\"{key}: {value}\")\n",
|
||||||
|
" return ' | '.join(parts)\n",
|
||||||
|
" except:\n",
|
||||||
|
" pass\n",
|
||||||
|
" return str(field)\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"data[\"description\"] = data[\"description\"].apply(clean_list_string)\n",
|
||||||
|
"data[\"features\"] = data[\"features\"].apply(clean_list_string)\n",
|
||||||
|
"data[\"details\"] = data[\"details\"].apply(clean_dict_string)\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "0011b3fa",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"SYSTEM_PROMPT = \"\"\"\n",
|
||||||
|
"You are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n",
|
||||||
|
"\n",
|
||||||
|
"Rules:\n",
|
||||||
|
"1. Analyze all available product information carefully\n",
|
||||||
|
"2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n",
|
||||||
|
"3. Consider product quality indicators, brand reputation, features, and typical market values\n",
|
||||||
|
"4. Return ONLY the numeric price (e.g., \"29.99\") \n",
|
||||||
|
"5. Do not include currency symbols, explanations, or additional text \n",
|
||||||
|
"6. Return just the raw float number\n",
|
||||||
|
"\"\"\""
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "043cb9d7",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def truncate_by_tokens(text, max_tokens=300):\n",
|
||||||
|
" \"\"\"Truncate to max tokens\"\"\"\n",
|
||||||
|
" encoding = tiktoken.encoding_for_model(\"gpt-4o-mini\")\n",
|
||||||
|
" tokens = encoding.encode(text)\n",
|
||||||
|
" \n",
|
||||||
|
" if len(tokens) <= max_tokens:\n",
|
||||||
|
" return text\n",
|
||||||
|
" \n",
|
||||||
|
" truncated_tokens = tokens[:max_tokens]\n",
|
||||||
|
" return encoding.decode(truncated_tokens)\n",
|
||||||
|
"\n",
|
||||||
|
"def generate_prompt(data):\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" Generate a prompt for the model to predict the price of a product\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
"\n",
|
||||||
|
" prompt = f\"\"\"\n",
|
||||||
|
" Below are the details of the product: \n",
|
||||||
|
" Title: {data['title']}\n",
|
||||||
|
" Description: {data['description']}\n",
|
||||||
|
" Features: {data['features']}\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" return truncate_by_tokens(prompt)\n",
|
||||||
|
"\n",
|
||||||
|
"def generate_message(data):\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" Generate a message for the model to predict the price of a product\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" messages = [\n",
|
||||||
|
" {\"role\": \"system\", \"content\": SYSTEM_PROMPT},\n",
|
||||||
|
" {\"role\": \"user\", \"content\": data[\"prompt\"]},\n",
|
||||||
|
" {\"role\": \"assistant\", \"content\": str(data['price'])}\n",
|
||||||
|
" ]\n",
|
||||||
|
" return messages\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "cdc8e3ff",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"data[\"prompt\"] = data.apply(lambda x: generate_prompt(x), axis=1)\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "2d1837c7",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"train_data = data.sample(n=200, random_state=42)\n",
|
||||||
|
"train_set = train_data.sample(frac=0.8, random_state=42)\n",
|
||||||
|
"validation_set = train_data.drop(train_set.index)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "7abfec95",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Create a jsonl file for the training set\n",
|
||||||
|
"\n",
|
||||||
|
"with open('training_data.jsonl', 'w') as f:\n",
|
||||||
|
" for index, row in train_set.iterrows():\n",
|
||||||
|
" messages = {\"messages\": generate_message(row)}\n",
|
||||||
|
" f.write(json.dumps(messages) + '\\n')\n",
|
||||||
|
"\n",
|
||||||
|
"with open('validation_data.jsonl', 'w') as f:\n",
|
||||||
|
" for index, row in validation_set.iterrows():\n",
|
||||||
|
" messages = {\"messages\": generate_message(row)}\n",
|
||||||
|
" f.write(json.dumps(messages) + '\\n')\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "a69291cb",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"client = OpenAI()\n",
|
||||||
|
"\n",
|
||||||
|
"# Uncoment the following code to train your own model\n",
|
||||||
|
"\n",
|
||||||
|
"# print(\"Uploading training file...\")\n",
|
||||||
|
"# training_file = client.files.create(\n",
|
||||||
|
"# file=open('training_data.jsonl', 'rb'),\n",
|
||||||
|
"# purpose='fine-tune'\n",
|
||||||
|
"# )\n",
|
||||||
|
"# print(f\"File uploaded: {training_file.id}\")\n",
|
||||||
|
"\n",
|
||||||
|
"# print(\"Uploading validation file...\")\n",
|
||||||
|
"# validation_file = client.files.create(\n",
|
||||||
|
"# file=open('validation_data.jsonl', 'rb'),\n",
|
||||||
|
"# purpose='fine-tune'\n",
|
||||||
|
"# )\n",
|
||||||
|
"# print(f\"Validation file uploaded: {validation_file.id}\")\n",
|
||||||
|
"\n",
|
||||||
|
"# print(\"Starting fine-tuning...\")\n",
|
||||||
|
"# job = client.fine_tuning.jobs.create(\n",
|
||||||
|
"# validation_file=validation_file.id,\n",
|
||||||
|
"# training_file=training_file.id,\n",
|
||||||
|
"# model='gpt-4o-mini-2024-07-18'\n",
|
||||||
|
"# )\n",
|
||||||
|
"# print(f\"Job created: {job.id}\")\n",
|
||||||
|
"\n",
|
||||||
|
"# status = client.fine_tuning.jobs.retrieve(job.id)\n",
|
||||||
|
"# print(f\"Status: {status.status}\")\n",
|
||||||
|
"\n",
|
||||||
|
"# import time\n",
|
||||||
|
"# while status.status not in ['succeeded', 'failed']:\n",
|
||||||
|
"# time.sleep(60)\n",
|
||||||
|
"# status = client.fine_tuning.jobs.retrieve(job.id)\n",
|
||||||
|
"# print(f\"Status: {status.status}\")\n",
|
||||||
|
"\n",
|
||||||
|
"# if status.status == 'succeeded':\n",
|
||||||
|
"# print(f\"Model ready: {status.fine_tuned_model}\")\n",
|
||||||
|
"# else:\n",
|
||||||
|
"# print(f\"Training failed: {status.error}\")"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "1c0dfc1d",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"class PriceTester:\n",
|
||||||
|
" \n",
|
||||||
|
" def __init__(self, predictor, data, title=\"Price Prediction Model\", size=None):\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" predictor: function that takes a row and returns predicted price\n",
|
||||||
|
" data: pandas DataFrame with test data\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" self.predictor = predictor\n",
|
||||||
|
" self.data = data\n",
|
||||||
|
" self.title = title\n",
|
||||||
|
" self.size = size or len(data)\n",
|
||||||
|
" self.guesses = []\n",
|
||||||
|
" self.truths = []\n",
|
||||||
|
" self.errors = []\n",
|
||||||
|
" self.sles = []\n",
|
||||||
|
" self.colors = []\n",
|
||||||
|
" \n",
|
||||||
|
" def color_for(self, error, truth):\n",
|
||||||
|
" \"\"\"Determine color based on error\"\"\"\n",
|
||||||
|
" if error < 40 or error/truth < 0.2:\n",
|
||||||
|
" return \"green\"\n",
|
||||||
|
" elif error < 80 or error/truth < 0.4:\n",
|
||||||
|
" return \"orange\"\n",
|
||||||
|
" else:\n",
|
||||||
|
" return \"red\"\n",
|
||||||
|
" \n",
|
||||||
|
" def run_datapoint(self, i):\n",
|
||||||
|
" \"\"\"Test single datapoint\"\"\"\n",
|
||||||
|
" row = self.data.iloc[i]\n",
|
||||||
|
" predict = self.predictor(row)\n",
|
||||||
|
" try:\n",
|
||||||
|
" guess = float(predict)\n",
|
||||||
|
" except (ValueError, TypeError):\n",
|
||||||
|
" print(f\"{YELLOW}{i+1}: Skipped - Non-numeric response: {predict[:50]}...{RESET}\")\n",
|
||||||
|
" return \n",
|
||||||
|
" \n",
|
||||||
|
" truth = float(row['price']) \n",
|
||||||
|
" error = abs(guess - truth)\n",
|
||||||
|
" log_error = math.log(truth + 1) - math.log(guess + 1)\n",
|
||||||
|
" sle = log_error ** 2\n",
|
||||||
|
" color = self.color_for(error, truth)\n",
|
||||||
|
" title = row['title'] if len(row['title']) <= 40 else row['title'][:40] + \"...\"\n",
|
||||||
|
" \n",
|
||||||
|
" self.guesses.append(guess)\n",
|
||||||
|
" self.truths.append(truth)\n",
|
||||||
|
" self.errors.append(error)\n",
|
||||||
|
" self.sles.append(sle)\n",
|
||||||
|
" self.colors.append(color)\n",
|
||||||
|
" print(f\"{COLOR_MAP[color]}{i+1}: Guess: ${guess:,.2f} Truth: ${truth:,.2f} Error: ${error:,.2f} SLE: {sle:.4f} Item: {title}{RESET}\")\n",
|
||||||
|
" \n",
|
||||||
|
" def chart(self, title):\n",
|
||||||
|
" \"\"\"Create scatter plot of predictions vs truth\"\"\"\n",
|
||||||
|
" plt.figure(figsize=(12, 8))\n",
|
||||||
|
" max_val = max(max(self.truths), max(self.guesses))\n",
|
||||||
|
" plt.plot([0, max_val], [0, max_val], color='deepskyblue', lw=2, alpha=0.6)\n",
|
||||||
|
" plt.scatter(self.truths, self.guesses, s=3, c=self.colors)\n",
|
||||||
|
" plt.xlabel('Ground Truth Price ($)', fontsize=12)\n",
|
||||||
|
" plt.ylabel('Predicted Price ($)', fontsize=12)\n",
|
||||||
|
" plt.xlim(0, max_val)\n",
|
||||||
|
" plt.ylim(0, max_val)\n",
|
||||||
|
" plt.title(title, fontsize=14)\n",
|
||||||
|
" plt.show()\n",
|
||||||
|
" \n",
|
||||||
|
" def report(self):\n",
|
||||||
|
" \"\"\"Generate final report with metrics\"\"\"\n",
|
||||||
|
" average_error = sum(self.errors) / self.size\n",
|
||||||
|
" rmsle = math.sqrt(sum(self.sles) / self.size)\n",
|
||||||
|
" hits = sum(1 for color in self.colors if color == \"green\")\n",
|
||||||
|
" hit_rate = hits / self.size * 100\n",
|
||||||
|
" \n",
|
||||||
|
" # Print summary\n",
|
||||||
|
" print(f\"\\n{'='*60}\")\n",
|
||||||
|
" print(f\"FINAL REPORT: {self.title}\")\n",
|
||||||
|
" print(f\"{'='*60}\")\n",
|
||||||
|
" print(f\"Total Predictions: {self.size}\")\n",
|
||||||
|
" print(f\"Average Error: ${average_error:,.2f}\")\n",
|
||||||
|
" print(f\"RMSLE: {rmsle:.4f}\")\n",
|
||||||
|
" print(f\"Hit Rate (Green): {hit_rate:.1f}% ({hits}/{self.size})\")\n",
|
||||||
|
" print(f\"{'='*60}\\n\")\n",
|
||||||
|
" \n",
|
||||||
|
" # Create chart\n",
|
||||||
|
" chart_title = f\"{self.title} Error=${average_error:,.2f} RMSLE={rmsle:.2f} Hits={hit_rate:.1f}%\"\n",
|
||||||
|
" self.chart(chart_title)\n",
|
||||||
|
" \n",
|
||||||
|
" # Return metrics\n",
|
||||||
|
" return {\n",
|
||||||
|
" 'average_error': average_error,\n",
|
||||||
|
" 'rmsle': rmsle,\n",
|
||||||
|
" 'hit_rate': hit_rate,\n",
|
||||||
|
" 'hits': hits,\n",
|
||||||
|
" 'guesses': self.guesses,\n",
|
||||||
|
" 'truths': self.truths,\n",
|
||||||
|
" 'errors': self.errors,\n",
|
||||||
|
" 'sles': self.sles,\n",
|
||||||
|
" 'colors': self.colors\n",
|
||||||
|
" }\n",
|
||||||
|
" \n",
|
||||||
|
" def run(self):\n",
|
||||||
|
" \"\"\"Run test on all datapoints\"\"\"\n",
|
||||||
|
" print(f\"Testing {self.size} predictions...\\n\")\n",
|
||||||
|
" \n",
|
||||||
|
" self.error = 0\n",
|
||||||
|
" for i in range(self.size):\n",
|
||||||
|
" self.run_datapoint(i)\n",
|
||||||
|
" \n",
|
||||||
|
" return self.report()\n",
|
||||||
|
" \n",
|
||||||
|
" @classmethod\n",
|
||||||
|
" def test(cls, predictor, data, title=\"Price Prediction Model\"):\n",
|
||||||
|
" \"\"\"Quick test method\"\"\"\n",
|
||||||
|
" return cls(predictor, data, title).run()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "4cc250e6",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def predictor(data):\n",
|
||||||
|
" user_prompt = data[\"description\"] \n",
|
||||||
|
" if not user_prompt or user_prompt.strip() == \"\":\n",
|
||||||
|
" print(\"Warning: Empty prompt!\")\n",
|
||||||
|
" return data[\"price\"]\n",
|
||||||
|
"\n",
|
||||||
|
" user_prompt = f\"\"\"\n",
|
||||||
|
" Return the price of the product in USD.\n",
|
||||||
|
" Return just the raw float number.\n",
|
||||||
|
"\n",
|
||||||
|
" Product Description: {user_prompt}\n",
|
||||||
|
" Note: Numbers in this description show product specifications like:\n",
|
||||||
|
" - Dimensions (size measurements)\n",
|
||||||
|
" - Weight (ounces/pounds)\n",
|
||||||
|
" - Rankings (popularity/sales rank)\n",
|
||||||
|
" - Part/model numbers\n",
|
||||||
|
" \n",
|
||||||
|
" Price prediction:\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
"\n",
|
||||||
|
" test = client.chat.completions.create(\n",
|
||||||
|
" # uncomment this line to use your own model\n",
|
||||||
|
" # model=status.fine_tuned_model, \n",
|
||||||
|
" model=FINE_TUNED_MODEL,\n",
|
||||||
|
" messages=[\n",
|
||||||
|
" {\"role\": \"system\", \"content\": SYSTEM_PROMPT},\n",
|
||||||
|
" {\"role\": \"user\", \"content\": user_prompt}\n",
|
||||||
|
" ]\n",
|
||||||
|
" )\n",
|
||||||
|
"\n",
|
||||||
|
" result = test.choices[0].message.content\n",
|
||||||
|
" return test.choices[0].message.content\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"#"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "8f480630",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# I prepared test set from the test_lite.pkl file\n",
|
||||||
|
"# I converted it from a list of objects to a pandas DataFrame\n",
|
||||||
|
"# I cleaned the data to remove None values and duplicates\n",
|
||||||
|
"\n",
|
||||||
|
"with open('../../test_lite.pkl', 'rb') as file:\n",
|
||||||
|
" test = pickle.load(file)\n",
|
||||||
|
"\n",
|
||||||
|
"test_set_in_obj_format = []\n",
|
||||||
|
"for t in test:\n",
|
||||||
|
" desc = \" \".join(t.prompt.split(\"\\n\")[2:4])\n",
|
||||||
|
" title = t.title\n",
|
||||||
|
" price = t.price\n",
|
||||||
|
" test_set_in_obj_format.append({\"description\": desc, \"price\": price, \"title\": title})\n",
|
||||||
|
"\n",
|
||||||
|
"test_set = pd.DataFrame(test_set_in_obj_format)\n",
|
||||||
|
"\n",
|
||||||
|
"test_set[\"title\"] = test_set[\"title\"].apply(str)\n",
|
||||||
|
"test_set[\"description\"] = test_set[\"description\"].apply(str)\n",
|
||||||
|
"\n",
|
||||||
|
"# Replace \"None\" and [] with None \n",
|
||||||
|
"test_set[\"price\"] = test_set[\"price\"].replace(\"None\", None)\n",
|
||||||
|
"test_set[\"title\"] = test_set[\"title\"].replace(\"\", None)\n",
|
||||||
|
"test_set[\"description\"] = test_set[\"description\"].replace(\"[]\", None)\n",
|
||||||
|
"\n",
|
||||||
|
"test_set = test_set.dropna()\n",
|
||||||
|
"test_set[\"price\"] = test_set[\"price\"].apply(float)\n",
|
||||||
|
"\n",
|
||||||
|
"test_set = test_set.drop_duplicates(subset=[\"title\", \"description\",\"price\"])"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "297f1aed",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"result = PriceTester.test(predictor, test_set, title=\"GPT-4o-mini Fine-tuned\")"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"kernelspec": {
|
||||||
|
"display_name": ".venv",
|
||||||
|
"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.12.12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 5
|
||||||
|
}
|
||||||
160
week6/community-contributions/solisoma/training_data.jsonl
Normal file
160
week6/community-contributions/solisoma/training_data.jsonl
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Clip, Pilaster Ss T30-5055\n Description: Product Description Rendell HDCLP150 Pilaster Clip, Efficiency and ease-of-use are designed into the core of Rendell's commercial refrigeration products. From the Manufacturer Randell HDCLP150 Pilaster Clip , Efficiency and ease-of-use are designed into the core of Randell's commercial refrigeration products\n Features: This is a genuine OEM (Original Equipment Manufacturer) part. Use genuine OEM parts for safety reliability and performance\n "}, {"role": "assistant", "content": "2.0"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 279834 Gas Dryer Coil Kit Replacement for Maytag Whirlpool Kenmore GE Samsung. Dryer Gas Valve Ignition Solenoid Coil Set Replace 279834VP 306105 306106 694539 12001349 14201336 14205025 14210032\n Description: 279834 is an M series new style Gas Valve Ignition Solenoid Coil Kit, used in gas dryers. Includes 2 coils, one is the primary and one is the safety.When the igniter reaches a high enough temperature, the coils work together to open the gas valve.Both coils must be operational for the valve to open. If one stops working both should be replaced as a pair.This is a safety mechanism to ensure that there are no unsafe buildups of gas inside. This component is very widely applicable. Compatible with most Gas Dryer:Whirlpool, Maytag, Kenmore, Samsung, Admiral, Amana, Crosley, Roper, Estate, etc. Replace most new style gas coils Part #:279834, 279834VP, 279834BULK, 306105, 306106, 58804B, 63-6614, 63-6615, 694539,12001349, 14201336, 14202750, 14205025, 14210032, 3479, AP3094251, EAP334310"}, {"role": "assistant", "content": "9.5"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Deli-kit\u00ae 12 inch Gas Cooktop Dual Fuel Sealed 2 Burners Stainless Steel Gas Cooktop Drop-In Gas Hob Gas DK223-A01 Cooker Gas Cooker\n Description: Our products take original line stainless steel panel,It has the characters of anti-rust,difficult deformation and easy to clean.When cleaning, please use the soft cloth with light cleanser. Even there are scratches on the panel, just use steel wool scrub along the line direction on the panel. Product Features Direction 1,Our product size and cut hole size will be show in the insert pictures. There are two type of burners: 3.3KW triple ring work burner,1.75kw Semi Rapid burner; Which make all kinds of heating power output.The cast iron support are heavy and stable, coated with enamel , make it high temperature resistance and not easy to rust. the four feet under the cooker make it can use as table-top style also, easy to cook all kinds of food as you like. 2,This products is suitable for Nature Gas source but there are convert nozzle and BS brass joint for LPG source in the package.There is adjustment valve for flame adjustment. When you think the minimum flame is not enough,it can adjust in the place of knob and We rather professional to do so .If you want to change the gas source, please invite professional. Function attention 1,Our product take 110 Voltage AC power"}, {"role": "assistant", "content": "105.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: General Electric WE3X77 Dryer Drum Bearing\n Description: Product Description This is a genuine replacement part. The model number and name for the following item is: General Electric WE3X77 Dryer Drum Bearing. From the Manufacturer This is a genuine replacement part. The model number and name for the following item is: General Electric WE3X77 Dryer Drum Bearing\n Features: Manufacturer Model WE3X77 Genuine Replacement Part General Electric item Country of Origin: China\n "}, {"role": "assistant", "content": "63.84"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: GE WE3X75 Genuine OEM Rear Drum Support Bearing for GE Dryers\n Description: Product Description This high quality Genuine OEM GE Appliances Rear Drum Support Bearing (WE3X75) helps the drum rotate smoothly and quietly . The Rear Drum Support Bearing has approximate measurements of L: 1\" x W: 1\" x H: 0.75\". Please be aware that it is recommended to disconnect the appliance from all utilities prior to installation of the Rear Drum Support Bearing. From the Manufacturer This is a genuine replacement part. The model number and name for the following item is: GE WE3X375 Dryer Drum Bearing\n Features: The GE Appliances WE3X75 Rear Drum Support Bearing is a genuine OEM (Original Equipment Manufacturer) part designed and engineered to exact specifications Replacement GE Appliances Dryer Rear Drum Support Bearing helps the drum rotate smoothly and quietly GE Appliances WE3X75 Dryer Rear Drum Support Bearing has approximate measurements of L: 1\" x W: 1\" x H: 0.75\" High quality GE Appliances OEM WE3X75 Dryer Rear Drum Support Bearing is manufactured with premium materials for durability and exact fit, be sure to follow instructions in owners manual when installing this part Repair your appliance with confidence when you choose Genuine GE Appliances Parts & Accessories\n "}, {"role": "assistant", "content": "8.23"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: GE WB48T10059 Rack Oven Gy\n Description: This is an O.E.M. Authorized part . This is an authorized aftermarket product. Fits with various WB48T10059 brand models.\n Features: This is an O.E.M. Authorized part This is an authorized aftermarket product Fits with various WB48T10059 brand models\n "}, {"role": "assistant", "content": "50.61"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Supco LP280187 Washer Drain Pump Motor Assembly\n Description: Washer Drain Pump MotorThis washing machine motor is a direct replacement for Whirlpool Duet front load washers. This high-quality part, Model No. LP280187 is designed to meet or exceed OEM specifications. Supco parts are built to last and popular among repair technicians and DIYers.Product FeaturesPart No. LP280187; Replaces 280187, AP3953640, 1200164, 280187VP, 285998, 8181684, 8182819, 8182821, AH1485610, EA1485610 and PS1485610Complete pump and motor assemblyAbout SupcoFounded in 1945 in the Bronx, NY by two naval engineers, Sealed Unit Parts Co.,Inc (SUPCO) originated as a service company for refrigeration systems. We bring continued product line expansion through in-house development, master distributor relationships, and acquisition. This strengthens our position as a leader in the HVAC, Refrigeration and Appliance industries.\n Features: WASHER DRAIN PUMP MOTOR - This washing machine drain pump is a complete pump and motor assembly for Whirlpool Duet front load washers. PREMIUM REPLACEMENT - This Supco washer drain pump motor is an excellent replacement for Whirlpool brands include Whirlpool, Maytag, KitchenAid, Jenn-Air, Amana, Magic Chef, Admiral, Norge, Roper,"}, {"role": "assistant", "content": "46.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Air Filter Factory Replacement for Kenmore 154120 Humidifier Wick Filter\n Description: Authentic Air Filter Factory Brand Product UPC 842477100322. This non-OEM replacement wick filter is made in the USA and designed, as well as distributed solely by Air Filter Factory. This is not a OEM product and is not covered under any manufacturer's warranty. The brand name and logos are the registered trademarks of their respective owners. Any use of the brand name or model designation for this product is made solely for purposes of demonstrating compatibility..\n Features: Part Number \u2013 154120 Humidifier Wick Filter Replacement For a Humidifier. Quality - Proudly Made In The USA Our Compatible 154120 Humidifier Wick Filter Is Made From A High Quality Paper Pulp For Maximum Wicking And Moisture Output. Our Wick Filters Are Reinforced With A Layer Of High Grade Aluminum To Extend The Life Of The Filter. Application - For Maximum Performance Using Filtered Water Is Best, Hard Water Can Lead To A Shorter Lifespan Of Your Humidifier Filter. Weather Is Also A Factor In The Life Span Of Your Filter. Running Your Furnace Higher Than 72 degrees F Can Make Your Humidifier Work Harder To Get Moisture In The Air Which Can Lead To A Dry Wick. Discoloration Of Humidifier Wick Filters Is Normal And Will Vary Depending On Water Quality. Make Sure Filter Is Fl"}, {"role": "assistant", "content": "14.97"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Camco 00903 Electric Range Knobs Top Burner (Chrome)\n Description: From the Manufacturer Electric range top burner knobs are easy to install. Four chrome knobs are included in each pack. Includes adapters, inserts and dials needed for installation.\n Features: Includes 4 chrome knobs Includes adapters inserts and dials Chrome finish Electric top burner knobs Easy to install\n "}, {"role": "assistant", "content": "36.01"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 2-Pack Replacement for Hotpoint HSS25GFTHBB Refrigerator Water Filter - Compatible with Hotpoint MWF, MWFP Fridge Water Filter Cartridge\n Description: This is a Denali Pure Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any OEM brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by Denali Pure.\n Features: Replacement for MWF Filter\n "}, {"role": "assistant", "content": "23.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: AP6008880 Lid Switch Assembly Compatible With Whirlpool Washers\n Description: Compatible with the following brands: Whirlpool, Maytag, KitchenAid, Jenn-Air, Amana, Magic Chef, Admiral, Norge, Roper, and Kenmore brands. (Model Specific). Lid Switch AssemblyCommon Issues Fuse Fixes include: Washing machine will NOT start, washing machine will NOT drain, washing machine will NOT fill with water. 90 Day Manufacturer Warranty.\n Features: Compatible with the following brands: Whirlpool, Maytag, KitchenAid, Jenn-Air, Amana, Magic Chef, Admiral, Norge, Roper, and Kenmore brands. (Model Specific). Lid Switch Assembly Common Issues Fuse Fixes include: Washing machine will NOT start, washing machine will NOT drain, washing machine will NOT fill with water. 90 Day Manufacturer Warranty.\n "}, {"role": "assistant", "content": "9.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Garland 1089100\n Description: Product Description 1089100, Open Burner Knob, Garland and US Range commercial kitchen equipment features products, parts and service - ovens, grills, griddles. From the Manufacturer 1089100, Open Burner Knob , Garland and US Range commercial kitchen equipment features products, parts and service - ovens, grills, griddles\n Features: This is a genuine OEM (Original Equipment Manufacturer) part. Use genuine OEM parts for safety reliability and performance.\n "}, {"role": "assistant", "content": "15.67"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Gxcdizx 6 Pack Replacement Humidifier Filter HFT600 Filters T Compatible with Honeywell HFT600 HEV615 HEV615B HEV615W HEV620 HEV620B HEV620W HEV-615 HEV-615B HEV-615W HEV-620 HEV-620B HEV-620W\n Description: Great Fit: Compatible with HFT600T HFT600PDQ HEV615, HEV615B, HEV615W, HEV620, HEV620B, HEV620W; Compatible with HEV-615, HEV-615B, HEV-615W, HEV-620, HEV-620B, HEV-620W.\n Features: Fit Model: Replace for Honeywell HFT600T HFT600PDQ HEV615, HEV615B, HEV615W, HEV620, HEV620B, HEV620W, HEV-615, HEV-615B, HEV-615W, HEV-620, HEV-620B, HEV-620W.\n "}, {"role": "assistant", "content": "29.5"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 2 Pack 20-40inch Stainless Steel Stove Gap Covers,Stove Gap Filler,Heat Resistant\u201cT\u201d Kitchen Stove Guards Between Stove and Counter,Used for Prevent Messy Spills and Debris,Silver\n Description: Description: Material: high quality stainless steel Size:20-40inch Color:Silver Package included:2*stove gap cover Feature: 1.The stove gap covers are made of high-quality stainless steel, ensuring durability and resistance to deformation caused by high temperature, humidity, and oxidation. 2.The stove countertop gap covers are designed with a full-length \"T\" underside, featuring a chamfer at the bottom, which effectively fixes them in place and prevents them from sliding or shifting. 3.The stainless steel stove gap cover filler is specifically designed to fit the gap between the stove and counter, providing a seamless and tight fit that prevents spills and debris from falling through. 4.By using these stove side gap guards, you can say goodbye to the hassle of pulling out the stove to clean the hard-to-reach gaps, as they effectively block any food or liquid from entering the gap. 5.Cleaning the stove gap covers is a breeze, thanks to their smooth surface. Simply wipe them with a damp cloth or even toss them in the dishwasher for a thorough clean. 6.With their sleek design, these kitchen stove counter gap cover seamlessly blend into modern kitchens, adding a"}, {"role": "assistant", "content": "23.48"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Seneca River Trading Dryer Light Bulb 3 Pack for Whirlpool, AP6006279, PS11739347 3406124, WP22002263\n Description: Brand New, Pack of 3, clothes dryer, 10 Watt, Clear Incandescent Light Bulb.\n Features: Replaces Part Numbers: AP5645645, 10C7, 11975, ER10C7, HC-H6291, LT004, S3903, PS3632384. Order Will Include Three Pieces!\n "}, {"role": "assistant", "content": "8.34"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Whirlpool W11086533 Sound Shield, White\n Description: Whirlpool Sound Shield\n Features: This Is A Genuine Oem Replacement Part Country Of Origin: United States From The Brand: Whirlpool Number Of Items: 1\n "}, {"role": "assistant", "content": "25.22"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: EXPWE12X10012 Dryer Idler Pulley Replaces WE12X10012, AP3777968, PS959967 For GE\n Description: Idler Pulley Wheel\n Features: WE12X10012, AP3777968, PS959967 Quality Replacement parts by XPARTCO Fits OEM Standards! Guaranteed to Exceed OEM Requirements! In stock, Ships Fast\n "}, {"role": "assistant", "content": "16.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Edgewater Parts 358237, AP6008726, PS11741866 Washer Agitator Bolt Compatible With Whirlpool Washer Fits Model# (LSQ, LSR, LSN, LLR, KAW, WTW, MTW)\n Description: Edgewater Parts 358237 Washer Agitator Bolt Compatible With Whirlpool Washer\n Features: \u2705 Replaces: WP358237, AP6008726, 285009, 357082, 357083, 357231, 358500, 359198, 97831, PS11741866, WP358237VP \u2705 1 Year Warranty \u2705 MONEY-BACK GUARANTEE - For Any Reason You're Not Completely Satisfied, You Can Ask For A Replacement Or Full Refund, No Questions Asked.\n "}, {"role": "assistant", "content": "9.25"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Forchrinse Orange Refrigerator Door Handle Covers,Non-Slip Kitchen Appliance Handle Cover Protector for Refridge Oven Dishwasher Microwave Set of 2\n Description: 41cm*13.5cm(16.1*5.3inch) Handle Covers,set of 2,can be used on handle of fridge, microwave, oven, kitchen cabinet, dish washer and other appliances.Protecting your home appliance away from smudges and food stains,water drips,fingerprints.Perfect decoration to your kitchen.\n Features: [Size]:16.1 inches in length ,5.3 inches in width. [Material]:Made of high quality polyester,which is durable,soft,comfortable. [Function]:Keep you from cold touching feeling in cold winter,protecting your home appliance away from smudges and food stains,water drips,fingerprints. [Easy to use]:This handle cover set is design with Velcro fastening for easy adjustment and remove. [Set of 2]:It can be used on handle of fridge,microwave,oven,kitchen cabinet,dish washer and other appliances.\n "}, {"role": "assistant", "content": "11.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Imperial 38049 Ir-Front top Grate, 12 X 11\n Description: Imperial 38049 Ir-Front Top Grate, 12 X 11 Genuine OEM replacement part Imperial Supplies LLC has been a national distributor of quality maintenance products since 1958 Use genuine OEM parts for safety reliability and performance\n Features: Product Type:Food Service Supply Item Package Dimensions:5.334 cm L X27.94 cm W X28.702 cm H Item Package Weight:5.897 kg Country Of Origin: United States\n "}, {"role": "assistant", "content": "100.0"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: YesParts W10268397 Durable Cooktop Harns Wire compatible with WPW10268397 1873883 AH2377304 EA2377304\n Description: YesParts Part Number W10268397 replaces WPW10268397 1873883 AH2377304 EA2377304 PS2377304Use of the Manufacturers trade names and logos are the registered trademarks of their respective owners. Any use of the Manufacturers brand name, part numbers or model designation for this product is made solely for purposes of demonstrating and for identification compatibility and are displayed for descriptive purposes only. Use of them does not associated with, imply any affiliation or endorsement by any manufacturer. Compatible with MGC7430WB00 MGC7430WS00 MGC7430WW00 MGC7630WB00 MGC7630WW00\n Features: YesParts Durable Cooktop Harns Wire W10268397 Comes with Full 1 Year Warranty or 90 Days No Questions Asked Money Back to Return the Product YesParts Premium Quality Harns Wire and Meets or even Exceeds OEM Specifications Quality. Made Easy to Install and Exact to Fit Most Top Brand Cooktops. Comes Brand New in Original Retail Packaging Part Number W10268397 replaces WPW10268397 1873883 AH2377304 EA2377304 PS2377304 Compatible With Most Cooktops including MGC7430WB00 MGC7430WS00"}, {"role": "assistant", "content": "95.31"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Whirlpool 3392519 Dryer Thermal Fuse\n Description: This is an O.E.M authorized part. Fits various whirlpool models. Oem part number 3392519. Made in united states.\n Features: This is an O.E.M authorized part Fits various whirlpool models O.E.M part number 3392519 This is a Whirlpool replacement part Part Number 3392519 This is an O.E.M. part\n "}, {"role": "assistant", "content": "14.49"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Electrolux 134365300 Frigidare Door Boot Spring\n Description: Product Description This is a Genuine Replacement Part, The Model Number and Name for The Following Item: Electrolux (ELEHI) 134365300 Door Boot Spring. From the Manufacturer This is a Genuine Replacement Part,The Model Number and Name for The Following Item:Electrolux (ELEHI) 134365300 Door Boot Spring\n Features: Electrolux (ELEHI) Genuine Replacement Part Appliance-replacement-parts Country of Origin: China\n "}, {"role": "assistant", "content": "29.75"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: EXPWE4X692 Dryer Gas Valve Solenoid 3 Terminal (Replaces WE4X692, AP2042752, PS268153) For General Electric, Hotpoint, RCA\n Description: Gas valve solenoid coil 3 terminal\n Features: WE4X692, AP2042752, PS268153 Quality Replacement parts by Express Parts Direct Fits OEM Standards! Guaranteed to Exceed OEM Requirements! In stock, Ships Fast\n "}, {"role": "assistant", "content": "8.9"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Sony SONKDL42EX440 Remote Control (RM-YD080)\n Description: REMOTE CONTROL (RM-YD080)\n Features: REMOTE CONTROL (RM-YD080)\n "}, {"role": "assistant", "content": "7.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Gas Range Oven Burner Igniter For Samsung Gas Range NX60T8711SG/AA NX60T8711SS/AA NX60T8711ST/AA NX60T8751SG/AA NX60T8751SS/AA\n Description: Package included: 1 x Gas Range Oven Burner Igniter as the picture. (Ships from the USA) Note: -This is aftermarket parts replace for Gas Range Samsung.-If you are not sure about the compatibility please contact us for advice. we will solve your problem within 24 hours-USE Ctrl + F to SEARCH your model number For model: NX58R9311SS/AA NX58T5601SB/AA NX58T5601SW/AA NX58T7511SG/AA NX58T7511SS/AA NX60T8111SG/AA NX60T8111SS/AA NX60T8311SG/AA NX60T8311SS/AA NX60T8511SG/AA NX60T8511SS/AA NX60T8511ST/AA NX60T8711SG/AA NX60T8711SS/AA NX60T8711ST/AA NX60T8751SG/AA NX60T8751SS/AA\n Features: Package included: 1 x Gas Range Oven Burner Igniter as the picture. (Ships from the USA"}, {"role": "assistant", "content": "34.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Whirlpool 279769 Thermal Cutoff Kit\n Description: This is an O.E.M authorized part. Fits various whirlpool models. Oem part number 279769. Made in united states.\n Features: This is an O.E.M authorized part Fits various whirlpool models O.E.M part number 279769 This is a Whirlpool replacement part Part Number 279769 This is an O.E.M. part\n "}, {"role": "assistant", "content": "22.63"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 5304506518 Dishwasher Filter 154252702 Genuine OEM\n Description: Important : Any use of the manufacturers brand name, part numbers or model designation for this product is made solely for purposes of demonstrating and for identification compatibility and are displayed for descriptive purposes only. Use of the Manufacturers trade names and logos are the registered trademarks of their respective owners. Use of them does not associated with, imply any affiliation or endorsement by any manufacturer.\n Features: This filter (part number 5304506518) is for dishwashers. Filter 5304506518 removes food particles and debris from the water to prevent the drain from clogging Part # 5304506518 Replaces : 154252702 , 4456335, AP6036337, PS11770485 Substitution : The manufacturer substituted part 154252702 with this new part 5304506518 Compatible with Brands : Frigidaire, Electrolux, Gibson, Kelvinator, Westinghouse, Crosley, Kenmore, Tappan\n "}, {"role": "assistant", "content": "19.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Replacement Mini Cooler Small Fridge Cable Compatible for Cooluli/Chefman/Uber Appliance Mini Fridge\n Description: Mini Cooler Small Fridge Power Cable Compatible for Cooluli / Chefman / Uber Appliance Mini Fridge\n Features: 1, Replacement Car mini fridge power cable , please confirm your cooler socket before buy it . 2, Cigarette lighter plug is connected to the Car power socket ,and the another side is connected to the device .The cable quality is very good, safe and practical. 3, Output : 12V 5A . 4, Cable legnth : 2 m ( 6.5 ft ) , Connector shape : 7.5 * 13.3 mm . 5, Warranty : 6 months\n "}, {"role": "assistant", "content": "9.88"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: LG MHL42613229 Refrigerator Glass Shelf Genuine Original Equipment Manufacturer (OEM) Part\n Description: Genuine Original Equipment Manufacturer (OEM) parts! This shelf (part number MHL42613229) is for refrigerators. Follow the directions in the owner's manual to install refrigerator shelf MHL42613229 in your refrigerator. Wear work gloves to protect your hands. For Kenmore Elite, Lg, & Kenmore.\n Features: This part is compatible with models including; 79574053412,LSFXC2476S/01,79574053411,79574049410,79574053410,79574049411,LFXC24796D/00,LFX25991ST/01,LFX25991ST/00,LFXC24796S/00,LSFXC2476S/00,LSFD2491ST/00,LFXC24726D/00,79575042610,79574043411,79574049412,79579993510,79574043410,79579993511,LSFXC2496D/00,79574043412,LFXC24726S/02,LFXC24726S/03,LFXC24726S/00,79575049610,LFXC24726S/01,79575053710,79575053712,LFXC24726S/04,LFX"}, {"role": "assistant", "content": "36.0"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Camco 00681 2585W/250V Bake Element\n Description: From the Manufacturer Replacement bake and broil element.\n Features: 1-5/8 in length Prongs 17-5/8 in total length, 1-1/4 in spacing between Prongs Fits GE Nos. WB44x105, WB44x118, WB44x120, WB44x126, WB44x133, WB44x5061 and WB44x5099; and Chromalox No. CH44x5090\n "}, {"role": "assistant", "content": "36.13"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Nemco 55424-2\n Description: Product Description The Nemco 55424-2 3/8\" Blade And Holder Assembly is a genuine OEM (original equipment manufacturer) replacement part. Nemco provides food equipment with an outstanding reputation for quality. Use genuine OEM parts for safety, reliability, and performance. Approved by original equipment manufacturer (OEM) and intended only for designed and specified use. From the Manufacturer 55424-2, 3/8 INCH BLADE AND HOLDER ASSEMBLY. Nemco Genuine OEM replacement part. Nemco provides food equipment with an outstanding reputation for quality. Use genuine OEM parts for safety reliability and performance.\n Features: Genuine OEM replacement part Nemco provides food equipment with an outstanding reputation for quality Genuine OEM parts provide safety, reliability, and optimal performance Approved by original equipment manufacturer (OEM) Intended only for designed and specified use\n "}, {"role": "assistant", "content": "113.21"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Whirlpool WP98005318 Handle Door\n Description: This is a genuine replacement part. The model number and name for the following item is: Whirlpool WP98005318 Handle Door\n Features: Country of Origin: UNITED STATES The Package Length of the product is 3.5 inches The Package Width of the product is 4.2 inches The Package Height of the product is 4.5 inches\n "}, {"role": "assistant", "content": "88.53"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: GE WH01X10743 Parts Retainer Knob\n Description: This is an authorized aftermarket product. Fits with various GE brand models. Oem part # WH01X10743.\n Features: This is an O.E.M. Authorized part Fits with various GE brand models Oem part # WH01X10743\n "}, {"role": "assistant", "content": "24.12"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 4-Pack W10314173 Dryer Drum Roller Replacement for Maytag MEDE300VF2 Dryer - Compatible with WPW10314173 Roller Drum Support Kit\n Description: 4-Pack UpStart Components Replacement W10314173 Dryer Drum Roller for Maytag MEDE300VF2 DryerPlease note: This is an UpStart Components Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by UpStart Components.\n Features: UpStart Components Replacement W10314173 Dryer Drum Roller for Maytag MEDE300VF2 Dryer. Quantity: 4 Ultra durable, high quality material resists wear and tear over time. Easy at-home installation. An affordable way to extend the life of your machine. Please make sure to check your original part to confirm that you are buying the correct product. Compatible WPW10314173 Roller Drum Support Kit for Part Number WPW10314173, AP6019303, W10314173, W10314171, 3388342, 3389902, 3396801, 3396802, 3401846, 8536973, 8536974, PS117"}, {"role": "assistant", "content": "19.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Sahishnu Online & Marketing Stainless Steel Sev Sancha Maker, Murkul Maker, Manual Pasta Maker,Shev Maker, Gathiya Murukulu Janthikulu Maker Machine With 6 Different Steel Jali\n Description: Stainless Steel Sev Chakli Maker/Murukku Maker/Sev Maker maching/Sev Sancha with 6 Different SS Jalis.\n Features: Sev Sancha Gathiya Murkul Manual maker Material - Stainless Steel , Color- Silver Easy to make snacks,cookies by the help of it. Stainless Steel Sev Chakli Maker/Murukku Maker/Sev Maker maching/Sev Sancha with 6 Different SS Jalis Dimension: Length :2.6 x Width:2.6 x Height: 6 inches\n "}, {"role": "assistant", "content": "14.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 154445901 DISHWASHER FILL VALVE REPAIR PART FOR FRIGIDAIRE. ELECTROLUX. KENMORE AND MORE\n Description: Valve Water Fill (P)\n Features: If unsure, please provide model number of appliance to the seller to verify.\n "}, {"role": "assistant", "content": "51.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Edgewater Parts WR60X26085 Refrigerator Evaporator Fan Motor Compatible with GE Refrigerator Fits Model# (GTH, GTK, GTL, GTZ)\n Description: Edgewater Parts WR60X26085 Refrigerator Evaporator Fan Motor Compatible With GE Refrigerator\n Features: Edgewater Parts WR60X26085 Refrigerator Evaporator Fan Motor Compatible With GE Refrigerator Replaces WR60X20324, PS11737119, WR60X10244 1 Year Warranty \u2705 MONEY-BACK GUARANTEE - For Any Reason You're Not Completely Satisfied, You Can Ask For A Replacement Or Full Refund, No Questions Asked.\n "}, {"role": "assistant", "content": "28.65"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Sunniswi DD82-01112A / \u200eDD94-01013A Dishwasher Silverware Basket Competible Replacement For Samsung Dishwasher Parts\n Description: Good quality OEM FOR SAMSUNG DISHWASHER\n Features: DD82-01112A Dishwasher silverware spoon basket Part number DD82-01112A (AP5800459) replaces PS8764597. - Model : DW80K7050U* DW80F600UTB/AA DW80F600UTS/AA DW80F600UTW/AA DW80F800UWS/AA DW80F800UWS/AC DW80F600UTB/AC DW80F600UTS/AC DW80F600UTW/AC DW80J3020US/AA DW80K5050UG/AA DW80K5050US/AA DW80K7050US/AA DW80K7050UG/AA DW80K5050UW/AA DW80J3020UB/AA DW80J3020UW/AA DW80K5050UB/AA DW80J3020UB/AC DW80K5050UB/AC DW80J3020US/AC DW80J3020UW/AC DW80K5050UW/AC DW80R5060UG/AA DW80J9945US/AA DW80J9945US"}, {"role": "assistant", "content": "69.77"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 8537982 Washer Pedestal Parts By prime&swift Compatible with pedestal hardware Replaces 1179857 AP6012995 PS11746216 PS988850 AP6012995\n Description: Leg support 8537982 is for laundry appliance pedestals, it fits on the top corner of the pedestal and supports the laundry appliance leg. Fits models MHP1500SB0, MHP1500SB1, MHP1500SK1, MHP1500SQ0, MHP1500SQ1; 3XWHP1505SH0, 3XWHP1505SQ0, 3XWHP1505SU0, 3XXHP1550VW0; KAP1500SMTO, LAB2700MK3, LAB2700ML3, LAB2700MQ3, LAB2700MQ4, LAB2700MT3, LAB2700PMT3, LAB1550YW0; MHP1000SB0, MHP1000SQ0, MHP1000SQ1, WFP2715HBK0, WFP2715HC0, WFP2715HW0, WHP1000SB1, WHP1000SK1, WHP1000SL1, WHP1000SQ1, WHP1000SQ3, WHP1000ST1, WHP1000"}, {"role": "assistant", "content": "8.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Ice O Matic 9041087-03 Hi Temp Thermostat\n Description: Product Description 9041087-03, Hi Temp Thermostat, Ice-O-Mastic is the premier manufacturer, distributor and supplier of ice machines worldwide. From the Manufacturer 9041087-03, Hi Temp Thermostat, Ice-O-Matic is the premier manufacturer, distributor and supplier of ice machines worldwide\n Features: This is a genuine OEM (Original Equipment Manufacturer) part. Use genuine OEM parts for safety reliability and performance.\n "}, {"role": "assistant", "content": "86.27"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Joovy Boob CleanFlow Vents, Grey, 2 Count\n Description: The 1-piece, patented CleanFlow vent is one of the most important and innovative elements of the Joovy Boob Baby Bottle. The vent ring is made from a hard PPSU plastic that is co-molded with a soft silicone vent sleeve to create a one-piece, easy to clean advanced vent. Air flows into the bottle through four evenly spaced openings ensuring proper venting regardless of how the bottle is held. Proper venting reduces air intake by your baby and prevents vacuum effects. All of this helps reduce colic. The CleanFlow vent ring has four lock notches that fit perfectly into the bottle's neck, eliminating over and under tightening that can cause leaks and/or result in inconsistent liquid flows. Parents go to great lengths sterilizing bottle components only to handle parts with unsterilized hands. The vent's unique design allows assembly while touching only the hard cent ring - but not the silicone vent sleeve that comes in contact with the feeding liquids. The Joovy Boob Baby Bottle's CleanFlow Vent assures cleaning, assembly and feeding are easy - and consistent.\n Features: Proper venting is critical in preventing vacuum effects and reduces air intake by your baby The unique design has 4 lock notches that fit perfectly into the bottle's neck, eliminating over and under tightening which can cause leaks and/or inconsistent liquid flow The vent"}, {"role": "assistant", "content": "6.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Washplate Pulsator Assembly AGZ72909711 for LG, Kenmore, Sears Washer parts\uff0cReplaces AP6800730, AGZ72909702, AGZ72909703.\n Description: 1.Washplate Pulsator Assembly AGZ72909711 for LG, Kenmore, Sears Washer parts\uff0cReplaces AP6800730, AGZ72909702, AGZ72909703.2.AGZ72909711 Replaces the Following Part Numbers: 796.29002000, 796.29002010, 796.29272000, 796.29272010, 796.29272900, 796.29278000, 796.29278010, 796.29278900, 796.29472000, 796.29478000, WT1101CW, WT1201CV, WT1201CW, WT1501CW, WT1701CV, WT1701CW, WT4870CW, WT4970CW, WT5001CW, WT5070CW, WT5101HV, WT5101HW, WT5170HV, WT5170HW, WT5270CW, WT5480CW..3. Fits Models: AGZ72909711, AP6800730, AGZ72909702, 4873462, AGZ72909703, AGZ72909706,"}, {"role": "assistant", "content": "65.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Nispira Humidifier Wick Replacement Filter Compatible with Honeywell HAC-504 HAC-504AW. Fits HCM-350 Series, HEV355, HCM-315T, HCM-300T, HEV312, HCM-710, 4 Packs\n Description: A premium humidifier wick filter designed by Nispira compared to Honeywell HAC-504 Filter A. This is not a Honeywell OEM product. The Honeywell brand names and logos are the registered trademarks of their respective owners. Any use of the Honeywell brand name or model designation for this product is made solely for purposes of demonstrating compatibility.\n Features: Premium humidifier wick filter designed by Nispira compatible with Honeywell HAC-504 Filter A. Compatible models: HCM-300T, HCM-305T, HCM-310T, HCM-315T, HCM-350, HCM-350B, HCM-350W, HCM-350B-CST,HCM-530, HCM-535, HCM-535-20, HCM-540, HCM-550, HCM-550-19, HCM-551, HCM-560,HCM-630, HCM-631, HCM-632, HCM-632TG,HCM-635, HCM-640BW, HCM-645, HCM-646"}, {"role": "assistant", "content": "14.98"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Range Oven Relay Control Board EBR74164805 Replacement for LG Range Stove Oven Replaces LRE3021ST LRE3083SW LRE3083ST\n Description: Replaces part number: for EBR74164805 Fits for the following models, including but not limited to: LRE3021ST LRE3083SW LRE3083ST LRE6321ST LRE6383BD LRE6383SB LRE6383ST LRE6383SW How it works: Oven relay control board EBR74164805 replacemnet receives signals from the main oven control board. The relay control board operates relays to regulate the oven elements Note: Please contact us if you have any questions,comments or issues, we\u2019ll get back to you within 24 hours Your satisfaction would be our greatest motivation\n Features: Fits for LG LRE3021ST, LRE3083SW,\u00a0LRE3083ST,\u00a0LRE6321ST, LRE6383BD, LRE6383SB, LRE6383ST, LRE6383SW, etc The control board replacemnent is designed to solve the oven heating issues for LG Oven relay control board EBR74164805 receives signals from the main oven control board. The relay control board operates relays to regulate the"}, {"role": "assistant", "content": "98.0"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: StoveGuard Stove Protectors for Greystone RV Ranges | Custom Cut | Ultra Thin Easy Clean Stove Liner | Made in the USA | 3 Burner Model\n Description: A few years back, we were looking for an effective but EASY way to keep our stove top free of grease and grime, while avoiding those toxic household cleaning chemicals. After trying several options, including those awful little squares that you have to cut yourself, we knew there had to be a better way. That\u2019s why we decided to research and create our own solution. Voil\u00e0\u2014StoveGuard was the solution to the problem! We knew we had the answer we were looking for and that would help millions of families who experience the same problem. Cleaning less meant having more time to do the things we enjoy. It made perfect sense\u2014Clean less, live more! StoveGuard\u2122\u2014A family owned and operated company \u2022 Custom cut to fit your stove! Select your specific model number from the dropdown.\u2022 Just wash under the faucet.\u2022 Save on expensive, environmentally unsafe cleaning products. \u2022 Durable and fire retardant.\u2022 30-day satisfaction guarantee.\n Features: \u2714\ufe0f CHOOSE YOUR BRAND AND NUMBER OF BURNERS - Refer to the Black and White image (Picture #2) to compare to your burner layout. Please confirm that you are choosing the correct number of burners and layout for your stove! \u2714\ufe0f Made in the USA and custom fit - "}, {"role": "assistant", "content": "29.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Frigidaire 240358006 FRIGIDAIRE FREEZER SHELF\n Description: Frigidaire Refrigerator Wire Shelf (24 1/2\" x 14) Genuine OEM Part # 5304530262 Part Number 5304530262 replaces \u00a0240358003, \u00a0240358009 , 240358006 Contac us to verify model.\n Features: <P>THIS 240358006 FRIGIDAIRE REFRIGERATOR SHELF IS COMPATIBLE WITH MANY FRIGIDAIRE, CROSLEY GIBSON, KENMORE AND ELECTROLUX REFRIGERATORS/FREEZERS.</P><P>THIS REFRIGERATOR RACK IS DESIGNED TO HELP YOU ORGANIZE AND KEEP TRACK OF THE FOOD IN YOUR REFRIGERATOR. SOME ARE DESIGNATED FOR Works with the following models: Frigidaire CRT216HLB1, Frigidaire CRT216HLQ1 Frigidaire CRT216HLS1, Frigidaire CRT216HLW1, Crosley CRTE217AB0, Frigidaire CRTE217AB2\n "}, {"role": "assistant", "content": "83.25"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Supco Series LP6440 Washer Drain Pump 436440\n Description: Supco LP6440 Washer Drain Pump Motor Assembly This high-quality part is designed to meet or exceed OEM specifications. Direct replacement for Bosch 436440, 1106007, 0436440, AP3764202, 00674704, 00703146, 674704, 703146, AH3464593, EA3464593, PS3464593, PS8714879. About Supco Founded in 1945 in the Bronx, NY by two naval engineers, Sealed Unit Parts Co.,Inc (SUPCO) originated as a service company for refrigeration systems. We bring continued product line expansion through in-house development, master distributor relationships, and acquisition. This strengthens our position as a leader in the HVAC, Refrigeration and Appliance industries.\n Features: WASHER DRAIN PUMP MOTOR - This premium quality part is a direct replacement for Bosch 436440, 1106007, 0436440, AP3764202, 00674704, 00703146, 674704, 703146, AH3464593, EA3464593, PS3464593, PS8714879. PREMIUM REPLACEMENT - Supco LP6440 washer drain pump motor is designed to meet or exceed OEM specifications. HIGHEST-QUALITY PARTS - Supco"}, {"role": "assistant", "content": "56.17"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Nemco SC466-1 3/16 Inch Blade Assembly\n Description: Product Description SC466-1, 3/16 INCH BLADE ASSEMBLY. Nemco Genuine OEM replacement part. Nemco provides food equipment with an outstanding reputation for quality. Use genuine OEM parts for safety reliability and performance. From the Manufacturer SC466-1, 3/16 INCH BLADE ASSEMBLY. Nemco Genuine OEM replacement part. Nemco provides food equipment with an outstanding reputation for quality. Use genuine OEM parts for safety reliability and performance.\n Features: Made in United States Package length : 5.0\" Package width : 9.0\" Package height : 9.0\"\n "}, {"role": "assistant", "content": "66.67"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Dryer Heating Element Replace For Kenmore 11064982300 11063912100 11082826103 11085088400 11086992100 110.67902790 110.64982300 110.63912100 110.82826103 110.85088400 110.86992100 With Thermostat\n Description: Package included: All Dryer Heating Element and Dryer Thermal Fuse as picture. (Ships from the USA) Note: -please check your old heating element to make sure it is same as the picture or contact us when ordering to avoid confusion because yes a lot of models we can't list all-If you are not sure about the compatibility please contact us for advice. we will solve your problem within 24 hours-USE Ctrl + F to SEARCH your model number For model: 11068133414 11068722700 11068732700 11068822700 11068832700 11068837700 11068842700 11068847700 11068932790 11068932791 11068932792 11068934790 11068934791 11068934792 11068942890 11068942891 11068942892 11068944890 11068944891 11068944892 11068972890 11068972891 11068972892 110689"}, {"role": "assistant", "content": "35.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 2-Pack W10314173 Dryer Drum Roller Replacement for Maytag MEDC300BW0 Dryer - Compatible with WPW10314173 Roller Drum Support Kit\n Description: 2-Pack UpStart Components Replacement W10314173 Dryer Drum Roller for Maytag MEDC300BW0 DryerPlease note: This is an UpStart Components Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by UpStart Components.\n Features: UpStart Components Replacement W10314173 Dryer Drum Roller for Maytag MEDC300BW0 Dryer. Quantity: 2 Ultra durable, high quality material resists wear and tear over time. Easy at-home installation. An affordable way to extend the life of your machine. Please make sure to check your original part to confirm that you are buying the correct product. Compatible WPW10314173 Roller Drum Support Kit for Part Number WPW10314173, AP6019303, W10314173, W10314171, 3388342, 3389902, 3396801, 3396802, 3401846, 8536973, 8536974, PS117"}, {"role": "assistant", "content": "9.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Disposable Paper Filters for Small K Cup coffee Pod and Large K-Carafe Reusable Filter\n Description: To help people to purchase more Conveniently,satisfied one time of Large and small paper filters combination.Recommend Use with our reusable filters. package 1 set (50 pcs large and 50 pcs small)\n Features: Recommend Use with our reusable filters,Special paper filters combination large& small stype for use for large reusable filter and small ones,Reliable Compatibility \u2014 Paper Coffee Filters are designed to work perfectly with your Keurig 2.0 carafe filter Easy to Use - Just place the filter in a K Carafe Cup, fill with your favorite kind of coffee, close the lid and brew away! No More Grounds! - Our paper filters keep your fresh brew free of grounds or other sediment better than most other reusable systems. Great Taste--High quality papers trap all the grounds and most of the coffee's natural oils, delivering a smoother, less-bitter flavor. Satisfied one time of Large and small paper filters combination.Recommend Use with our reusable filters.<br> <b> package 1 set (50 pcs large and 50 pcs small)\n "}, {"role": "assistant", "content": "8.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: ForeverPRO 216649313 Controller Kit for Frigidaire Freezer (AP5690408) 216649318 216649313 2754574\n Description: ForeverPRO Freezer Controller Kit Part Number 5304491584 (AP5690408) replaces 216649318 216649313 2754574 PS8689570Fits Frigidaire Freezer. Compatible with Electrolux Frigidaire Gibson Kelvinator Westinghouse and others This is not a Frigidaire OEM product. Use of the Manufacturers trade names and logos are the registered trademarks of their respective owners. Any use of the Manufacturers brand name, part numbers or model designation for this product is made solely for purposes of demonstrating and for identification compatibility and are displayed for descriptive purposes only. Use of them does not associated with, imply any affiliation or endorsement by any manufacturer.Compatible with CFC13M5AW0 CFC13M5AW1 CFU14F1AW1 CFU14M2AW0 CFU14M2AW1 CFU14M2AW2 CFU14M2AW3 CFU17F3AW2 FFC13C2AW0 FFC13C3AW0 FFC13C4AW0 FFC13C4AW1 FFC13C7AW0 FFC13C7AW1 FFC13G7AW0 FFC13G7"}, {"role": "assistant", "content": "49.31"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: LG MBE62002902 Burner, Silver\n Description: MBE62002902\n Features: Manufacturer Model #MBE62002902 Genuine Replacement Part LG Item Fits with various LG brand models Refer to you manual to ensure ordering the correct, compatible part\n "}, {"role": "assistant", "content": "43.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: General Electric WB44T10031 Range/Stove/Oven Bake Element , Black\n Description: Product Description The high quality GE Appliances Bake Element (WB44T10031 ) is at the bottom of the oven and supplies the heat for baking. The Bake Element is for electric ovens on ranges and replaces 911594, AH249302, EA249302, PS249302. Please be aware that it is recommended to use saftey equipment and to disconnect the appliance from all utilities prior to any service or repair. Please refer to your owners manual to confirm part numbers and for instructions as some repairs require a trained service professional to complete. From the Manufacturer This is a Genuine Replacement Part,The Model Number and Name for The Following Item: General Electric (GENF0) WB44T10031 Range/stove/oven Bake Element\n Features: The GE Appliances Bake Element is a genuine OEM (Original Equipment Manufacturer) part designed and engineered to exact specifications GE Appliances Bake Element is at the bottom of the oven and supplies the heat for baking GE Appliances WB44T10031 is for electric ovens on ranges The high quality GE Appliances Bake Element replaces 911594, AH249302, EA249302, PS249302 Repair your appliance with confidence when you choose factory certified GE Appliances Parts & Accessories\n "}, {"role": "assistant", "content": "84.94"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Aftermarket Replacement for Kenmore 3387610 Clothes Dryer Belt\n Description: This is a Brand New Aftermarket Replacement Dryer Belt\n Features: This is a Brand New Aftermarket Replacement Dryer Belt Top Qualty Aftermarket Replacement Part!\n "}, {"role": "assistant", "content": "8.9"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 2-Pack Replacement for Whirlpool GI0FSAXVY Refrigerator Water Filter - Compatible with Whirlpool 4396395 Fridge Water Filter Cartridge\n Description: This is a Denali Pure Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any OEM brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by Denali Pure.\n Features: Replacement for UKF8001 Filter\n "}, {"role": "assistant", "content": "21.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: GE Part Number WB06X10705 ROTATING RING ASM\n Description: This is an O.E.M. authorized part. Fits with various GE Brand models. OEM Part # WB06X10705. The product is manufactured in Mexico.\n Features: This is an O.E.M. authorized part Fits with various GE Brand models OEM Part # WB06X10705\n "}, {"role": "assistant", "content": "40.08"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Whirlpool W10491331 Dishwasher Spray Arm (Replaces W10491331) Genuine Original Equipment Manufacturer (OEM) Part\n Description: Genuine Original Equipment Manufacturer (OEM) parts! This spray arm (part number WPW10491331) is for dishwashers. Spray arm WPW10491331 rotates and sprays water to clean the dishes inside the dishwasher tub. Wear work gloves to protect your hands during this repair. For Whirlpool, Amana, & Ikea.\n Features: This part is compatible with models including; WDF331PAHB1,WDT720PADB2,WDT910SSYW3,WDT720PADB1,WDT720PADB3,ADB1400AGW3,WDT720PADB0,WDT910SSYW1,WDT910SSYW2,WDT770PAYM3,WDF331PAHS1,WDF750SAYB1,WDF750SAYB3,WDF750SAYB2,WDF530PSYW6,WDF530PSYW7,WDF530PSYW3,WDF530PSYW4,WDF530PSYW5,WDT730PAHW0,WDF750SAYT3,ADB1700ADW2,ADB1700ADW1,ADB1700ADW4,ADB1700ADW3,IUD8555DX4,WDF775SAYW1,IUD8555DX3,IUD"}, {"role": "assistant", "content": "37.92"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Trion 123324-008 Air Purifier Filter, Electronic Pre-Filter for TrimTX\n Description: The Trion 123324008 is a replacement prefilter. This model is specifically designed for use with electronic cleaners. The prefilter is made of aluminum, which resists corrosion and ensures lengthier lifespan.\n Features: Trion electronic cleaner replacement pre-filter\n "}, {"role": "assistant", "content": "33.03"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: GE WH13X10058 Water Valve\n Description: This is an authorized aftermarket product. Fits with various GE brand models. Oem part # WH13X10058.\n Features: This is an O.E.M. Authorized part Fits with various GE brand models Oem part # WH13X10058\n "}, {"role": "assistant", "content": "87.0"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: watchget Espresso Paper Filter 58mm, Disposable Coffee Filter Paper Unbleached Espresso Filter Puck Screen Portafilter Paper Compatible with 58mm Portafilters Baskets Espresso Coffee Maker, 100 Pieces\n Description: \u2615 \u3010BETTER ESPRESSO EXTRACTION\u3011WATCHGET coffee paper filter effectively improve the espresso extraction rate and reduce coffee splash. Prolong the life of the filter basket and the shower screen. Cleaning the coffee machine becomes more easily and convenient. One sample pack, total of 100 filters. 100pcs a pack of independent sealed packaging is cleaner and more hygienic, not easy to damp. \u2615 \u3010KEEP YOUR SHOWER CLEAN\u3011Effectively prevent coffee grounds from sticking to the espresso machine shower screen. Cleaning shower screen turns to be much easier. Directly throw away after use, save your time to clean the puck screen each time, making your extraction process more efficient. \u2615 \u3010EASY TO USE\u3011Put a filter paper on the top to disperse the water more evenly and avoid channeling, which is similar to the effect of a stainless steel puck screen to improve water distribution to some extent. You can also put a filter paper on the bottom to prevent the fine powder from blocking the basket and to improve the flow rate. In this case it's slightly larger than the diameter of the basket. \u2615 \u3010PREMIUM MATERIAL\u3011The paper filter is delicate and uniform in"}, {"role": "assistant", "content": "5.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: W10350376 Dishwasher Top Rack Adjuster Replacement for KitchenAid KUDS30FXSS9 Washer - Compatible with W10350376 Rack Adjuster Dishwasher Upper Top Adjuster with Wheels - UpStart Components Brand\n Description: UpStart Components Replacement W10350376 Dishwasher Top Rack Adjuster for KitchenAid KUDS30FXSS9 WasherPlease note: This is an UpStart Components Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by UpStart Components.\n Features: UpStart Components Replacement W10350376 Dishwasher Top Rack Adjuster for KitchenAid KUDS30FXSS9 Washer Premium quality materials for lasting durability. Easy at-home installation helps extend the life of your machine. An affordable solution to costly appliance repairs. Compatible W10350376 Rack Adjuster Dishwasher Upper Top Adjuster with Wheels for Part Number AP5956100, W10350376, PS10064063, W10238418, W10253546, W10712394VP\n "}, {"role": "assistant", "content": "7.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Frigidaire Broan 316442300 Surface Element for 8 inch burner on the range\n Description: Product Description The high quality Frigidaire Surface Element (316442300 ) supplies the heat to a cooking area on top of the electric range. The Surface Element includes 8\" Surface Burner Element and has 4 turns and has approximate size 10 X 8 inches. Please be aware that it is recommended to use saftey equipment and to disconnect the appliance from all utilities prior to any service or repair. Please refer to your owners manual to confirm part numbers and for instructions as some repairs require a trained service professional to complete. This Part fits: Replaces Part Number 222T032P06L, Replaces Part Number 318372213, Replaces Part Number 318372203, Replaces Part Number 316265600, Replaces Part Number 5308005320, Replaces Part Number 5303325551, Replaces Part Number 5303311320, Replaces Part Number 5303207161, Replaces Part Number 5301314952, Replaces Part Number 382059, Replaces Part Number 3202348, Replaces Part Number 3051450, Replaces Part Number 3051018, Replaces Part Number 3017927, Replaces Part Number 3015715, Replaces Part Number 3015186, Re"}, {"role": "assistant", "content": "23.88"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: EvertechPRO 280187 Washer Drain Pump Assembly for 285998 8181684 8182819 8182821\n Description: EvertechPRO Washer Replacement Washer Drain Pump Assembly Part Number 280187 replaces 285998 8181684 1200164 8182819 8182821 AH1485610 EA1485610 PS1485610This is not a Whirlpool OEM product. Fits Whirlpool Washer. Compatible with MFW9600SQ0 MFW9600SQ1 MFW9700SB0 MFW9700SB1 MFW9700SQ0 MFW9700SQ1 MFW9800TK0 MFW9800TQ0 MHWE300VW10 MHWE300VW11 MHWE300VW12 MHWE300VW13 MHWE400WJ00 MHWE400WJ01 MHWE400WR00 MHWE400WR01 MHWE400WW00 MHWE400WW01 MHWE450WJ00 MHWE450WJ01 MHWE450WJ02 MHWE450WR00 MHWE450WR01 MHWE450WR02 MHWE450WW00 MHWE450WW01 MHWE450WW02 MHWE500VW10 MHWE500VW11 MHWE500VW12 MHWE550WJ00 MHWE550WJ01 MHWE550WR00 MHWE550WR01 MHWE550WW00 MHWE550WW01"}, {"role": "assistant", "content": "52.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: GE WB23K5027 Electric Range Infinite Switch\n Description: Product Description The GE Appliances WB23K5027 Surface Element Control Switch is a genuine OEM (Original Equipment Manufacturer) part designed and engineered to exact specifications. It turns the surface element on and off and controls how much heat the element produces and fits with brands including GE, Kenmore, and Hotpoint. It is recommended to disconnect the appliance from all utilities prior to installation of the Silverware Basket. From the Manufacturer General Electric WB23K5027 Electric Range Infinite Switch is commonly used on GE, Hotpoint, and other range brands. This model is for an 8\" surface burner and is a genuine GE part which comes with GE's 1 year warranty.\n Features: The GE Appliances WB23K5027 Surface Element Control Switch is a genuine OEM (Original Equipment Manufacturer) part designed and engineered to exact specifications. The Surface Element Control Switch turns the surface element on and off and controls how much heat the element produces. The GE Appliances replacement Surface Element Control Switch for Ranges fits with brands of GE, Kenmore, and Hotpoint. The High quality GE Appliances OEM WB23K5027 Surface Element Control Switch is manufactured with premium materials for durability and exact fit, be sure to refer to your appliance owners manual to confirm correspondence with this part. Experience confidence with Genuine GE Appliances Parts & Accessories when upgrading or repairing your appliance.\n "}, {"role": "assistant", "content": "74.8"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: GE WR24X10231 Door Gasket\n Description: Product Description This door gasket provides a seal on your refrigerator. From the Manufacturer This door gasket provides a seal on your refrigerator.\n Features: White in color Easy to install Genuine GE replacement part\n "}, {"role": "assistant", "content": "67.0"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: (Part New) Genuine OEM GE Refrigerator Door Handle WR12X32350 + all other models in the description\n Description: Item Number WR12X32350: New genuine OEM GE Refrigerator Door Handle. Included Brands: General Electric, Hotpoint, Kenm / Sears, RCA (and more!)\n Features: Item Number WR12X32350: GE Refrigerator Door Handle. Included Brands: General Electric, Hotpoint, Kenm / Sears, RCA (and more!)\n "}, {"role": "assistant", "content": "46.12"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Broan-NuTone BPS2FA30 2-Pack Aluminum Grease Filters, 2 Count (Pack of 1)\n Description: Product Description Improve your home's air quality with Broan-NuTone's Replaceable Aluminum Filters. These aluminum grease filters assist with ventilating the air in your kitchen and help keep your range hood operating at peak performance. This filter set is constructed of high-quality materials to ensure long-lasting use. It is designed for use with Broan-NuTone's 30\" QS2 and WD2 series range hoods to ensure the best air quality and flow throughout your kitchen. Measuring 14.3475\" x 0.375\" x 11.875\" each, the Broan-NuTone Replaceable Aluminum Filters are the perfect addition to your home! Broan-NuTone leads the industry with forward-thinking residential ventilation products, customized climate, communications and home automation solutions along with award winning customer service. Broan\u2019s inspiring heritage provides the foundation for its three global brands \u2013 Broan, NuTone and BEST. From the Manufacturer The Broan BPS2FA30 is a Ducted Filter set for 30-Inch Allure II range hoods. Made of aluminum. Fits series QS2, WS2. No one provides more ways to improve indoor air quality. From the spot ventilation and heating products, to our whole-house Broan Fresh Air Systems,"}, {"role": "assistant", "content": "34.37"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 3-Pack Refrigerator Water Filter Replacement for Whirlpool Ed5ghexnt00 - Compatible with Whirlpool 4396508, 4396510 Fridge Water Filter Cartridge\n Description: This is a Denali Pure Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any OEM brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by Denali Pure.\n Features: Replacement for 4396508 Filter\n "}, {"role": "assistant", "content": "29.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Whirlpool W12246610 Refrigerator Door Handle Trim Cap Genuine Original Equipment Manufacturer (OEM) Part\n Description: Genuine Original Equipment Manufacturer (OEM) parts! This door handle trim cap (part number WP12246610) is for refrigerators. Door handle trim cap WP12246610 attaches to the door handle and covers the handle mounting bolt. Wear work gloves to protect your hands when installing this part. For Amana, Maytag, Kenmore, Kenmore Elite, & Whirlpool.\n Features: This part is compatible with models including; MBF1958XEB4,MBF1958XEB3,ABB2524DEB,BR18V2S-P1320709WS,MBF1958XEB2,MBF1958XEB1,59672954200,59661103101,MBF1958XEB6,59661103100,MBF1958XEB5,59671273100,ARB190ZCB0,MBF1958XEB0,59672919200,59666954400,59666954401,59671273101,ABB2223DES1,MBF1958DEM00,ABB1922FEB,59673912200,ABB2524DEW,ABB1922FEW,ABB1922FEQ,IX3HHGXSS000,MBF2258HEB,ARB220ZCW"}, {"role": "assistant", "content": "12.79"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Whirlpool WHIW10083957V Chopper Blade for Dishwasher\n Description: Whirlpool Chopper Blade for Dishwasher\n Features: This is a genuine OEM replacement part.\n "}, {"role": "assistant", "content": "31.53"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: FAMIROSA Washing Machine Pedestal/Storage Drawer Stand Raiser Utility Room Adjustable Height Dryer Mini Refrigerator Cabinet Stand for Utility Room Home Furniture 24.8x21.3x12.2inch\n Description: This pedestal can be used to keep your washing machine off the floor and raise it to a more suitable working height, so you won't need to bend over too much to load or remove your laundry. Made of high-quality steel, the pedestal is very sturdy and can hold a washing machine with a weight of up to 220.5 lb. Thanks to the non-slip pads, the washing machine will stand stably. The feet are also rubberized, which makes them non-slip and keeps your floors from getting scratched. The pedestal also has an enclosed drawer for extra storage space. Assembly is easy. Color: White Color: White Material: Steel Material: Steel Weight: 22.5 lb Weight: 22.5 lb Dimensions: 24.8\" x 21.3\" x 12.2\" (W x D x H) Dimensions: 24.8\" x 21.3\" x 12.2\" (W x D x H) Load capacity: 220.5 lb Load capacity: 220.5 lb Suitable for all standard washing machines Suitable for all standard washing machines With non-slip pads With non-slip pads With rubberized feet With rubberized feet"}, {"role": "assistant", "content": "112.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Whirlpool 99002652 Drain Hose\n Description: Product Description This is a Genuine Replacement Part, The Model Number and Name for The Following Item: Whirlpool (WHIRA) 99002652 Hose, Drain. From the Manufacturer This is a Genuine Replacement Part,The Model Number and Name for The Following Item:Whirlpool (WHIRA) 99002652 Hose, Drain\n Features: Whirlpool (WHIRA) This is a genuine replacement part Appliance-replacement-parts\n "}, {"role": "assistant", "content": "52.57"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: DC97-07509B Replacement Dryer Idler Pulley Wheel only (Original Version)\n Description: Replaces the following part numbers: Part Number: DC97-07509B (AP4210071) Replaces: 2075486, DC66-00402A, B01AQHYGZQ. To search press CRTL+F and enter your model number DV306LEW/XAA DV306LGW/XAA DV203AEW/XAA-0000 DV203AGS/XAA-0000 DV203AGW/XAA-0000 DV206AES/XAA-0000 DV206AGS/XAA-0000 DV209AEW/XAA-0000 DV209AEW/XAA-0001 DV209AGW/XAA-0000 DV210AEW/XAA DV210AGW/XAA DV218AEB/XAA-0000 DV218AEB/XAA-0001 DV218AEW/XAA-0000 DV218AEW/XAA-0001 DV218AGB/XAA-0000 DV218AGW/XAA-0000 DV219AEW/XAA-0000 DV219AEW/XAA-0001 DV219AGB/XAA-0000 DV219AGW/XAA-0001 DV220AEW/XAA DV220AGW/XAA DV231AEW/XAA-0001 DV231AGW"}, {"role": "assistant", "content": "14.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: W10757851 Refrigerator Ice Level Control Board Replacement for Part Number PS10064583 Refrigerator - Compatible with 4389102 Icemaker Emitter Sensor Control Board - UpStart Components Brand\n Description: UpStart Components Replacement W10757851 Refrigerator Ice Level Control Board for Part Number PS10064583 RefrigeratorPlease note: This is an UpStart Components Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by UpStart Components.\n Features: UpStart Components Replacement W10757851 Refrigerator Ice Level Control Board for Part Number PS10064583 Refrigerator Ultra durable, high quality material resists wear and tear over time. Easy at-home installation. An affordable way to extend the life of your machine. Compatible 4389102 Icemaker Emitter Sensor Control Board for Part Number W10757851, AP5956767, 4389102, 2198585, 2198586, 2220398, 2220402, 2255114, 4388635, 4389102R, PS10064583, TJ4389102R, W10193666, W10193840, W"}, {"role": "assistant", "content": "18.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Supplying Demand 242044113 241940201 Refrigerator Freezer Defrost Heater\n Description: 242044113 241940201 Refrigerator Freezer Defrost Heater Replacement Compatible Models E23CS75DSS0 E23CS75DSS1 E23CS75DSS2 E23CS75DSS3 E23CS75DSS5 FLSC238DB0 FLSC238DB1 FLSC238DS0 FLSC238DS1 FLSC238DS2 FLSC238DS3 FLSC238DW0 FLSC238DW1 FLSC23F6DB1 FLSC23F6DS1 FLSC23F6DS2 FLSC23F6DS3 FLSC23F6DS5 FLSC23F6DW0 FLSC23F6DW1 FSC23BBDSB0 FSC23BBDSB1 FSC23BBDSB2 FSC23BBDSB3 FSC23BBDSB5 FSC23F7DB0 FSC23F7DB1 FSC23F7DB2 FSC23F7DSB0 FSC23F7DSB1 FSC23F7DSB2 FSC23F7DSB3 FSC23F7DSB4 FSC23F7DSB5 FSC23F7DSB7 FSC23F7DW0 FSC23F7TDB"}, {"role": "assistant", "content": "19.69"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: General Electric WD12X10136 Dishrack Roller\n Description: Product Description This is a genuine replacement part. The model number and name for the following item is: General Electric WD12X10136 Dishrack Roller. From the Manufacturer This is a genuine replacement part. The model number and name for the following item is: General Electric WD12X10136 Dishrack Roller\n Features: Manufacturer model # WD12X10136 Genuine Replacement Part General Electric item Manufacturer model # WD12X10136 Genuine Replacement Part Frigidair item\n "}, {"role": "assistant", "content": "12.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 8269144A Dishwasher Drain Hose Replacement for KitchenAid KUDS01DLBT7 - Compatible with 8269144A Hose\n Description: UpStart Components Replacement 8269144A Dishwasher Drain Hose for KitchenAid KUDS01DLBT7Please note: This is an UpStart Components Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by UpStart Components.\n Features: UpStart Components Replacement 8269144A Dishwasher Drain Hose for KitchenAid KUDS01DLBT7 Ultra durable, high quality material resists wear and tear over time. Easy at-home installation. An affordable way to extend the life of your machine. Please make sure to check your original part to confirm that you are buying the correct product. Compatible 8269144A Hose for Part Number 8269144A, AP4399659, 1489097, 8269144, AH2358130, EA2358130, PS2367048\n "}, {"role": "assistant", "content": "14.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Dundas Jafine INC34Z DUCT TO DUCT PLASTIC INCREASER\n Description: Dundas Jafine INC34Z Duct to Duct Increaser/Decrease\n Features: 3\" to 4\" together Attach 4\" ducting to 3\" exhaust collar\n "}, {"role": "assistant", "content": "7.24"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: HQRP Bearing and Seal Kit compatible with Whirlpool GHW9300PW3 GHW9300PW4 GHW9400PL0 GHW9400PL1 GHW9400PL2 GHW9400PL3 Front Load Washer Tub\n Description: Compatible with Whirlpool GHW9300PW3 GHW9300PW4 GHW9400PL0 GHW9400PL1 GHW9400PL2 GHW9400PL3. This kit includes three bearings and one seal used to fix front load washing machines with tub part numbers W10253864 AP4426951 8181666 8181912 W10772618 W10253855 8182284 W10772617 W10157909 W10250763. Disclaimer: This is not an Original Equipment Manufacturer (OEM) product, HQRP branded product is a replacement. All brand names and logos are registered trademarks of their respective owners. Any use of the brand names or model designations for this product are made solely for purposes of demonstrating compatibility.\n Features: HQRP\u00ae Replacement Bearing and Seal Kit; Kit Includes Three Bearings And One Seal; Compatible with # W10253864 AP4426951 8181666 8181912 W10772618 W10253855 8182284 W10772617 W10157909 W10250763; 200 days warranty!\n "}, {"role": "assistant", "content": "17.91"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Whirlpool Y303836 Dryer Blower Wheel Genuine Original Equipment Manufacturer (OEM) Part\n Description: OEM Factory Part. Y303836\n Features: Appliance Part Y303836\n "}, {"role": "assistant", "content": "9.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: KEURIG B40 Water Reservoir Lip Cover\n Description: WE ARE THE SPECIAL KEURIG PARTS SELLER. ALL PARTS ARE ORIGINAL. SHIP WITH BULK PACKAGE. Available color: BLACK and RED.\n Features: original keurig parts.\n "}, {"role": "assistant", "content": "29.18"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: ERP 0 Exact Replacement Parts ERB44X10009 Bake Element 2585/1940 Watts, 240/208 Volts\n Description: Product Description Generic Erb44x10009 Bake Element; 2,585 watts; 240 voltage maximum, .25 make terminals; Ge Wb44x10009. From the Manufacturer Generic Erb44x10009 Bake Element; 2,585 watts; 240 voltage maximum, .25 make terminals; Ge Wb44x10009\n Features: Bake Element 2585/1940 Watts, 240/208 Volts | Bake element replaces GE WB44X10009 | 2585/1940 Watts | 240/208 Volts | This is manufactured in China 2,585 watts 240volts, .25 make terminals Ge Wb44x10009 .25\" Male Terminals\n "}, {"role": "assistant", "content": "33.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Canamax Premium W10542314 Dishwasher Door Gasket with Strike - Exact Fit for Whirlpool Kenmore Maytag Amana Dishwashers - Replaces AP5650274, 2409202, W10542314, 8268888, W10284090\n Description: SPECIFICATIONS W10542314 Dishwasher Door Gasket with Strike - Black This one-piece door gasket provides a water-tight seal between the tub and the door, to keep water from leaking out of your dishwasher. If your dishwasher is leaking, tears or there are gaps in your gasket, you may need to replace the door gasket. This black door gasket is made of rubber, includes a new latch strike plate for the door latch, and is a genuine OEM part. Replaces part numbers : AP5650274, 2409202, W10542314, 8268888, W10284090, W10300589, W10350162, W10542314VP Works with most top name brands : Whirlpool, Kenmore, Maytag, Amana. Fixes the following symptoms : Leaking Not cleaning dishes properly Door latch failure Count on our W10542314 Dishwasher Door Gasket with Strike for an unrivaled mix of durability, convenient functionality, and great value for money. Click \u2018Add to Cart' now! The Whirlpool's brand names and logos are the registered trademarks of their respective owners. Any"}, {"role": "assistant", "content": "10.49"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: ForeverPRO W10117655 Pust To Start Switch for Whirlpool Dryer 1448106 AH1491565 EA1491565 PS1491565\n Description: ForeverPRO Dryer Pust To Start Switch Part Number W10117655 replaces 1448106 AH1491565 EA1491565 PS1491565Fits Whirlpool Dryer. Compatible with Whirlpool Maytag KitchenAid Jenn-Air Amana Magic Chef Admiral Norge Roper and others This is not a Whirlpool OEM product. Use of the Manufacturers trade names and logos are the registered trademarks of their respective owners. Any use of the Manufacturers brand name, part numbers or model designation for this product is made solely for purposes of demonstrating and for identification compatibility and are displayed for descriptive purposes only. Use of them does not associated with, imply any affiliation or endorsement by any manufacturer.Compatible with 7MMEDC300DW0 7MMEDC300DW1 7MMGDC300DW0 7MMGDC300DW1 7MMGDC300DW2 7MMGDC300DW3 7MMGDC300YW0 7MMGDC300YW1 7MMGDC300YW3 7MMGDC410AW0 7MMGDC410AW2 7MWGD1602AW0 7MWGD1730YW1 7MWGD1730YW3 CED137SBW0 C"}, {"role": "assistant", "content": "29.2"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: EvertechPRO WD35X21038 Lower Rack Wheel Kit Replacement for GE Appliance\n Description: EvertechPRO Appliance Replacement Lower Rack Wheel Kit This is not a GE OEM product. Fits GE Appliance. Compatible with 4071120 4071520 4071620 ADW1000K00BB ADW1000K00WW ADW1100N00BB ADW1100N00BB ADW1100N00WW ADW1100N00WW ADW1100N10BB ADW1100N10BB ADW1100N10WW ADW1100N10WW ADW1100N15BB ADW1100N15WW ADW1100N20BB ADW1100N20WW ADW1100N30BB ADW1100N30WW ADW1100N35BB ADW1100N35WW EDW2050F02CC EDW3000G01BB EDW3000G01CC EDW3000G01WW EDW3000G02BB EDW3000G02CC EDW3000G02WW EDW3000G03BB EDW3000G03CC EDW3000G03WW EDW3060G02SS EDW3060G03SS EDW4000G00BB EDW4000G00CC EDW4000G00WW"}, {"role": "assistant", "content": "7.59"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: French Press Replacement Cafetiere Filter Mesh Screen Coffee French Press Filters 4 Inch Stainless Steel Reusable Mesh Filter for 8 Cup/ 34 OZ/ 1000 ml Coffee Tea Makers (6 Packs)\n Description: Features: They could fit well in most 8-cup coffee press machines. Woven stainless steel material, doubled over edges and sturdy twill mesh designed for a nice filtration experience. Sufficient quantity provides your with filters for tea and coffee separatedly. No more mixed terrible taste. Specifications: Material: stainless steel Size (approx.): French press filter's diameter: 3.95 inches Hole: 0.32 inches Package includes: 6 x French press replacement filter screen\n Features: Good filtration quality: the filter uses a 100-count fine mesh screen, easily filtering out coffee grounds or loose tea, leaving you with a cup of pure and tasty coffee/ tea Highly compatible: with exquisite workmanship and proper size, the coffee press filters fit most 8-cup (34 oz) coffee press machines, sparing your efforts to look around for the right mesh Package content: 6 packs french press replacement filters, each measures approximately 4 inches in diameter with tightly folded edges, it's recommended to frequent replace your coffee filter parts for the freshest tasting beverages Durable material: the fine mesh screen is made of quality stainless steel, which is anti-rust and washable, and the double layered"}, {"role": "assistant", "content": "6.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Mountain Plumbing 953BRS Waste Disposer Air Switch, Brushed Stainless\n Description: From the Manufacturer Mountain Plumbing Products was founded in 1997 in partnership with Scotland-based McAlpine and Company Ltd., the well-known and well-respected leader in high-quality plumbing products manufacture, serving the United Kingdom and European markets. Our first year\u2019s offering included kitchen accessories, decorative sink strainers and disposer flanges. Since this modest start, Mountain Plumbing has consistently expanded its product offerings and finish selections to offer our customers the finest selection of quality designer kitchen and bath accessories. The hallmark of Mountain Plumbing\u2019s success: combining quality with innovative products that add beauty and value to your home\n Features: Safer than electric switch UL listed Other finishes available Works with any plug-in disposer Brushed stainless\n "}, {"role": "assistant", "content": "94.4"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Dundas Jafine EXWTZW Bathroom Fan Vent Kit with, Wall Style, 4 inch x 5' Vinyl Duct\n Description: Pro Vent bathroom fan and utility wall vent kit. Complete kit for through-the-wall vent installation. Ideal for use with either a 3\" or 4\" fan outlet. Kit includes: (1) 4\" white Pro Vent louvered vent hood (paintable), with an 11\" metal tailpiece, (1) 4\" x 5' white flexible vinyl duct, 2 plastic clamps, and 1-piece of 1\" thick adapter foam for 3\" to 4\" installations. Not recommended for dryer use. Retail box.\n Features: Braided Stainless Steel Wrapped Around Reinforced Braided Pvc With Brass Hex Connector Nuts Package length: 5.0\" Package Width: 10.0\" Package Height: 4.0\"\n "}, {"role": "assistant", "content": "22.83"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: SGF-MSWF Rx Pharmaceutical Replacement water filter for GE MSWF, MSWF3PK, MSWFDS,EFF-6022A,101820A by Swift Green Filters (1pack)\n Description: The GE MSWF, 101820A and EFF-6022A most compatible best in class and technology replacement refrigerator water filter by Internationally Certified Swift Green Filter SGF-MSWF Rx.Swift Rx will deliver fresh, clean, and great tasting water and ice cubes. Designed with technology using recycled coconut shells that create an internal carbon filter with up to 50% more filtering pores. The result is safe and clean drinking water that has eliminated contaminants and impurities that may have been present.\n Features: Industry certificated to meet NSF / ANSI 42 or 401 standard, Swift Green Rx using advance scientific purification process reduces chemicals, including pharmaceuticals, Volatile organic compounds (VOC), Chlorine Taste & Odor (CTO), pesticides, waterborne parasites, lead, Cyst mercury, asbestos, chlorlne and other industrial chemicals Made in the U.S.A using ONLY certified NSF/ ANSI lab tested raw material for its quality & performance. \u201c100% Guarantee for Highest Preformance in its class and Capacity in the Industry\u201d. Buy with confidence. Our Raw Material are BPA, Lead, Arsenic free Our mission is to Save Health !! Great alternative to expensive refrigerator branded filters. Does"}, {"role": "assistant", "content": "25.76"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Gas Range Oven Stove Ignitor Igniter Fits Kenmore K1321263\n Description: This is a Brand New Oven/Stove Replacement Ignitor\n Features: This is a Brand New Oven/Stove Replacement Ignitor Univeral Design and Easy Installation Make this a Top Qualty Replacement Part!\n "}, {"role": "assistant", "content": "36.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Cotton Flower Magnet Cover Dishwasher Stickers White Cotton Vase Panel Decal Dragonflies Cross Dishwasher Magnetic Refrigerator Decal Fridge Door Kitchen Home Appliance Decor Vinyl 23Wx26H INCH\n Description: The Cotton Vases Dragonflies Trust In The Love With All Your Heart Desiging Dishwasher Magnet Cover Sticker adds a touch of real beauty to your plain looking dishwasher,it\u2019s a Magnet Art, adds style with a cozy feeling. It would be pretty on anything you placed it on, absolutely love it. It Made of High Quality Self-Adhesive PVC and PET Film and Magnet. Multi-functional Features,such as Heat resistant, Waterproof, Scratch, and Tear Resistant.These Stickers hide scratches, dents, or other unsightly marks.With a smooth surface that is environmentally\u00a0safe,easy to remove with no sticky residue.The cover can be used on dishwasher door,fridge door and any metal home Appliance surface with magnetism. Two Sizes for select: S: 23x17inch (58.5x43cm) M: 23X26inch (58.5x66cm) Warm tips: 1.The sticker is a magnetic sticker, pls make sure your dishwasher door is magnetic. 2. Please confirm the size of the dishwasher before buying and whether it is magnetic. 3. Due to the inconsistent calibration of the monitor, the colors on the computer monitor may be slightly different.\n Features: Material:High"}, {"role": "assistant", "content": "39.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Universal Dishwasher Silverware Basket Replacement WD28X10128 Dishwasher Utensil Silverware Basket, Compatible with Part No. AH959351, EA959351, PS959351, WD28X10127, WD28X10132\n Description: WD28X10128 Dishwasher Silverware Basket. Pls note this is not an OEM product. The brand names are used to indicate compatibility.\n Features: Replaces Part Numbers: WD28X10128, AP3772889, 1088673, AH959351, EA959351, PS959351, WD28X10127, WD28X10132, B00MOCCSFW. With three center square pockets and two corner pockets, this dishwasher under rack silverware basket has plenty of room for smaller silverware. Make sure fit for yours before ordering.\n "}, {"role": "assistant", "content": "20.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Kenmore Elite Lg MJU62070602 Refrigerator Water Tubing Genuine Original Equipment Manufacturer (OEM) Part\n Description: Genuine Original Equipment Manufacturer (OEM) parts! Water tubing MJU62070602 is an original equipment manufacturer (OEM) part that fits some Kenmore, Kenmore Elite and LG refrigerators. Water tubing MJU62070602 supplies water to refrigerator components that require water such as the ice maker and water dispenser. Replaces original refrigerator water tubing part numbers 5210JA3004U, 5210JA3029U, MJU62070601 and MJU62070606. Fits some Kenmore and Kenmore Elite 795-series refrigerators. Also fits some LG refrigerators in these series: LFD, LFX, LMX, LRFD, LRSC and LSC. For Kenmore Elite, Lg, & Kenmore.\n Features: This part is compatible with models including; 79578743800,79578743801,LMX25984SB/00,79571016012,79578502802,79571016011,79578502800,79571016010,79578502803,LFX31935ST/02,79578502804,LFX31935ST/01,79571039011,79572069313,79578743802,79571039010,79572022110,79572069315,795"}, {"role": "assistant", "content": "13.0"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: American Metal Filter AMRHF0610 Washable OEM Grease Filter for Broan, Jenn Air and Whirlpool\n Description: Product Description RHF0610 - Aluminum mesh grease filter for range hoods and microwave ovens, 6-7/8\" x 15-9/16\", made in USA, wash and reuse, replace every 12 months, Replaces many OEM brands. From the Manufacturer The American Metal Filter AMRHF0610 Grease Filter contains an aluminum foil pad between (2) pieces of expanded aluminum. Length and width +- 1/16-inch and thickness +- 1/8-inch. This washable aluminum filter is used in ducted range hoods and microwave ovens to help remove grease particulate from the air. Wash the filter as often as required to prevent grease build up\u00a0and a resultant decrease in air flow. Soak in a solution of hot water and degreaser for 10-20 minutes. Agitate gently to remove loosened grease. A\u00a0residue of grease on the filter after washing is acceptable as this helps retain grease. Replace approximately every 6-months to improve air circulation and quality. This OEM part replaces Broan 99010242, Jenn Air 715290 and Whirlpool 71002111.\n Features: Aluminum grease filter for use in ducted range hoods and microwave ovens Length and width +- 1/16-inch and thickness +- "}, {"role": "assistant", "content": "8.97"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Edgewater Parts WR23X21444, W11396033, AP6026776 Light Switch Compatible With Whirlpool, GE Refrigerator (Fits Models: GSE, GSF, GSH, GSL, GSS)\n Description: \u2705 Fits Models: GSE22ESHB SS , GSE22ESHC SS , GSE22ESHD SS , GSE22ETHB BB , GSE22ETHB CC , GSE22ETHB WW , GSE22ETHC BB , GSE22ETHC CC , GSE22ETHC WW , GSE22ETHD BB , GSE22ETHD CC , GSE22ETHD WW , GSE25ESHB SS , GSE25ESHC SS , GSE25ESHD SS , GSE25ETHB BB , GSE25ETHB CC , GSE25ETHB WW , GSE25ETHC BB , GSE25ETHC CC , GSE25ETHC WW , GSE25ETHD BB , GSE25ETHD CC , GSE25ETHD WW , GSF25JGDCBB , GSF25JGDCWW , GSF25JGDD BB , GSF25JGDD WW , GSF25JGDE BB , GSF25JGDE WW , GSF25JGDF WW , GSF25JGDS WW , GSH22JGDCBB , GSH22"}, {"role": "assistant", "content": "8.65"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Replacement for KitchenAid KFCP22EXMP4 Refrigerator Water Filter - Compatible with KitchenAid 4396395 Fridge Water Filter Cartridge\n Description: This is a Denali Pure Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any OEM brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by Denali Pure.\n Features: Replacement for UKF8001 Filter\n "}, {"role": "assistant", "content": "10.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: ForeverPRO W10240947 Valve for Whirlpool Range PS11750890 W10240947\n Description: ForeverPRO Range Valve Part Number WPW10240947 replaces PS11750890 W10240947Fits Whirlpool Range. Compatible with Whirlpool Maytag KitchenAid Jenn-Air Amana Magic Chef Admiral Norge Roper and others This is not a Whirlpool OEM product. Use of the Manufacturers trade names and logos are the registered trademarks of their respective owners. Any use of the Manufacturers brand name, part numbers or model designation for this product is made solely for purposes of demonstrating and for identification compatibility and are displayed for descriptive purposes only. Use of them does not associated with, imply any affiliation or endorsement by any manufacturer.Compatible with MVWX600BW0 WTW5840BC0 WTW5840BW0\n Features: \u2705 Easy to Install - Made Exactly to Fit For Most Top Brand Ranges \u2705 No Questions Asked Money Back Guarantee. Proud USA Based Company. Comes with 1 Year Warranty or 90 Day Returns \u2705 PRO Grade Premium Valve - Meets or Exceeds OEM Specifications Quality. Comes Brand New in Original Retail Packaging \u2705 ForeverPRO Range Valve Part Number WPW10240947 replaces PS11750890 W10240947 \u2705 Check Description for Model Compatibility. Compatible With Most Whirlpool Ranges including MVWX600BW0 WTW5840BC0 WTW5840BW0 Compatible with Whirlpool Maytag KitchenAid Jenn-Air"}, {"role": "assistant", "content": "24.98"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: GE WB2X3468 Neon Lamp\n Description: This is an O.E.M. Authorized part . This is an authorized aftermarket product. Fits with various WB2X3468 brand models.\n Features: This is an O.E.M. Authorized part This is an authorized aftermarket product Fits with various WB2X3468 brand models\n "}, {"role": "assistant", "content": "15.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 4391960 Heating Element Replacement for Whirlpool LE5650XMW0 - Compatible with WP4391960 696579 Dryer Element\n Description: UpStart Components Replacement 4391960 Heating Element for Whirlpool LE5650XMW0Please note: This is an UpStart Components Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by UpStart Components.\n Features: UpStart Components Replacement 4391960 Heating Element for Whirlpool LE5650XMW0 Ultra durable, high quality material resists wear and tear over time. Easy at-home installation. An affordable way to extend the life of your machine. Please make sure to check your original part to confirm that you are buying the correct product. Compatible WP4391960 696579 Dryer Element for Part Number WP4391960, AP6009347, 4391960, 2013, 279218, 279247, 279248, 279410, 279411, 279455, 279598, 279698, 337378, 337430, 339655, 340468, 348775, 349542,"}, {"role": "assistant", "content": "26.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: DD62-00084A Dishwasher Water Inlet Valve Replacement for Samsung DW80J3020US/AA (0000) - Compatible with DD62-00084A Inlet Valve\n Description: UpStart Components Replacement DD62-00084A Dishwasher Water Inlet Valve for Samsung DW80J3020US/AA (0000)Please note: This is an UpStart Components Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by UpStart Components.\n Features: UpStart Components Replacement DD62-00084A Dishwasher Water Inlet Valve for Samsung DW80J3020US/AA (0000) Ultra durable, high quality material resists wear and tear over time. Easy at-home installation. An affordable way to extend the life of your machine. Please make sure to check your original part to confirm that you are buying the correct product. Compatible DD62-00084A Inlet Valve for Part Number DD62-00084A, AP5178218, 2692215, PS4222448\n "}, {"role": "assistant", "content": "26.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: ForeverPRO Certified DA29-00003G Refrigerator Water Filter Pack of 3 for Samsung DA29-00003G, Aqua-Pure Plus DA29-00003B, HAFCU1, DA29-00003A, HAFCU1 Filter, RSG257AARS\n Description: ForeverPRO Refrigerator Water Filter Part Number DA29-00003G replaces HAFCU1/XAA DA29-00003G DA29-00003B RSG257AARS RFG237AARS DA29-00003F HAFCU1 RFG297AARS RS22HDHPNSR WSS-1 WFC2201 DA97-06317A RF267AERS HAFIN2 DA29-00003A RF268ABRS DA61-00159 DA29-00003D HAFCU1/XAA HAFIN2/EXP DA29-00003 DA29-00003A-B DA61-00159A DA61-00159A-B DA61-159 AP4444333 Aqua Fresh WF289 Clear Choice CLCH103 Crystala Filters CF6 Dista DWF-11 HDX FMS-1Fits Samsung Refrigerator. This is not a Samsung OEM product. Use of the Manufacturers trade names and logos are the registered trademarks of their respective owners. Any use of the Manufacturers brand name, part numbers or model designation for this product"}, {"role": "assistant", "content": "14.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: General Electric WX09X10012 3 Wire 50amp Range Cord, 6-Feet\n Description: Product Description 3-wire, 6-ft., 50-amp cord. Works with most electric ranges with a 3-prong outlet box. Molded-on, right angle plug keeps cord close to wall. Ring terminals allow for easy hook-up. Includes cord clamp to relieve strain on terminals. From the Manufacturer 3-wire, 6-ft., 50-amp cord. Works with most electric ranges with a 3-prong outlet box. Molded-on, right angle plug keeps cord close to wall. Ring terminals allow for easy hook-up. Includes cord clamp to relieve strain on terminals.\n Features: 3-wire, 6-ft., 50-amp cord Works with most electric ranges with a 3-prong outlet box Molded-on, right angle plug keeps cord close to wall Ring terminals allow for easy hook-up Includes cord clamp to relieve strain on terminals\n "}, {"role": "assistant", "content": "27.13"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Frigidaire 242253002 Frigidare Water Valve\n Description: Product Description Is your refrigerator not keeping your food as cool as you need? The issue may be with the water inlet valve. This new valve for the refrigerator is a genuine replacement part that is perfect to replace the faulty inlet valve in a variety of fridges. The valve will help you keep the ideal amount of water running through your fridge to make sure that it functions ideally. From the Manufacturer This is a genuine replacement part. The model number and name for the following item is: Frigidaire 242253002 Water Valve\n Features: RECOMMENDED USE: Replacement water inlet valve for a fridge GENUINE REPLACEMENT PART: Made specifically to be compatible with Frigidaire and Electrolux refrigerators PART #: 242253002; made to replace 242102201 COMPATIBILITY: Ensure replacement part is compatible with your kitchen appliance before purchasing INSTALLATION: Follow installation instructions to ensure proper fit and function of this appliance part; do not force fit into appliance\n "}, {"role": "assistant", "content": "135.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: ApplianPar Oven Range Burner Control Knob Assembly AEZ73453509 for LG Kenmore Stove Switch Replaces AEZ72909008 AP5669773 2347547 PS7321756 5Pcs\n Description: Package includes: 5 x Oven Range Stove Knob Assembly\n Features: Fit for LG LDG3011ST, LDG3031ST, LDG3035ST, LDG3036ST, LDG3036ST (01), LDG3037ST, LRG3091ST, LRG3093ST, LRG3095ST, LRG3097ST, LDG3036ST/00, LDG3036ST/01, LDG3037ST/00, LRG3083ST/00, LRG3085ST/00, LRG3091ST/00, LRG3093ST/00, LRG3093ST/02, LRG3095ST/00, LRG3095ST/01, LRG3095ST/02 GAS RANGE. Fit for LG LDG3015ST, LDG3016ST, LDG3016ST/00, LDG3017ST/00, LRG3097ST/00 GAS RANGE DOUBLE OVEN. Replace part numbers: AEZ73453509, AP5669773, AEZ73453508, AE"}, {"role": "assistant", "content": "23.55"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 8066184 Dryer Motor Pulley for Maytag, Whirlpool, 3394341 AP6011686 1200324 PS11744884 WP8066184 EAP11744884\n Description: Fitment: Replaces Whirlpool, Maytag, KitchenAid, Jenn-Air, Amana, Magic Chef, Admiral, Norge, Roper, and othersReplace Part number: AP6011686, PS11744884, 8066184, 8578565, 3389627, 3394341, 3401143, 694871, W10290531, W10299847, W10402909The Compatibility Is Just For Reference. Please Compare The Part Number With Your Original One Before Purchasing!Note:1.We provide clear pictures, measurements where possible. Please check as much as possible to make sure the item is the one that you need.2.Please allow 0.5-1 inch difference due to manual measurement.(1inch=2.54cm)3.There Are No Instructions Included In This Kit.Professional Installation Is Highly Recommended!4.The color of the actual items may slightly different from the listing images due to different computer screen, thanks for your understanding.\n Features: Brand new dryer motor pulley [Ideal Replacement]: Want new 8066184 Motor Pulley that matches the original. This replacement motor pulley was specifically designed to look and function the same as the"}, {"role": "assistant", "content": "15.5"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Frigidaire 240338001 Door Bin for Refrigerator\n Description: Product Description This is a genuine replacement part. The model number and name for the following item is: Frigidaire 240338001 Door Bin for Refrigerator From the Manufacturer Frigidaire 240338001 Door Bin for Refrigerator. Works with the following model: Frigidaire 57-2707-10-02, Frigidaire 30-2251-00-01, Frigidaire 30-2251-23-01, Frigidaire 57-2707-10-01. Genuine replacement part.\n Features: Works with the following model: Frigidaire 57-2707-10-02 Works with the following model: Frigidaire 30-2251-00-01 Works with the following model: Frigidaire 30-2251-23-01 Works with the following model: Frigidaire 57-2707-10-01 Genuine replacement part\n "}, {"role": "assistant", "content": "39.1"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Refrigerator Capacitor for Frigidaire, Electrolux AP4315853 PS2333670 5304464438\n Description: Brand new refrigerator capacitor, replaces Frigidaire and other Electrolux brands, 5304464438.\n Features: Replaces part numbers: AP4315853, 218909913, 1381223, 216236200, 216236300, 216985003, 218719201, 218909901, 3015552, 3017761, 3091424, 5303289028, 5303310070, AH2333670, EA2333670, F000300399, F300399, PS2333670 Non-OEM replacement part\n "}, {"role": "assistant", "content": "17.02"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 811195 805328 Hood Knob Ventilation Hood Knob 805328 KIP5D44 5D44 compatible with Sub-Zero Wolf\n Description: \u2705 Edgewater Parts 811195, 805328 Ventilation Hood Knob P1363418 P1423418 PL342212 PL402212 PL462212 PL522212 PL582212 W482718 1543418 1663418 l282212I PW302210 PW362210 PW422210 PW482210 PW302418 PW3642418 PW422418 PW302718 PW362718 PW422718 PW482418 PW542418 PW602418 PW662418 PW482718 PW542718 PW602718 PW662718 PWC362418 PWC422418 PWC482418 PWC542418 W302210I W362210I W362210 W422210 W482210 W302418 W302718 W362418 W422418 W362718 W422718 W482418 W542418 W602418 W662418 W542718 W602718 W662718 L342212 W402212 L462212 L522212 L582212\n Features: \u2705 Edgewater Parts 811195, 805328 Ventilation Hood Knob Compatible With Sub Zero Range \u2705 1 Year Warranty \u2705 MONEY-BACK GUARANTEE - For Any Reason You're Not Completely Satisfied, You Can Ask For A Replacement Or Full"}, {"role": "assistant", "content": "6.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: RDEXP 10.03x2.55inch 2206670B Plastic Original Refrigerator Overflow Grille for 2206670B WP2206670B AP6006547\n Description: Specifications: Material: Plastic Color: Black Brand name: RDEXP Size: 25.5x6.5cm/10.03x2.55inch(LxW) Weight: 57 g Features: 1.Replaces part numbers 2206670B, WP2206670B, AP6006547, W10171993, PS11739623, W10189532, W10323446, WP2206670BVP. 2.Model number is 2206670B, please confirm whether the machine model matches before purchase. 3.Perfect replacement part,pull the existing dispenser overflow grille out and drop the new into place.4.Applicable brand:replacement for Whirlpool,replacement for KitchenAid,replacement for Kenmore,replacement for Maytag,replacement for Amana,replacement for Amana,replacement for Inglis,replacement for Roper. Package include: 1 x Refrigerator Overflow Grilles Each item with a unique Manufacturing Part Number label on the inner package to confirm it is the qualify checked and genuine item sold from our store,when you have any questions,please provide us the MPN label first.\n Features: Replaces part numbers"}, {"role": "assistant", "content": "7.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Samsung DC61-01215B Tension Spring\n Description: This is an O.E.M. Authorized part. Fits with various Samsung brand models. OEM part # DC61-01215B. This product is manufactured in south Korea.\n Features: This is an O.E.M. Authorized part Fits with various Samsung brand models OEM part # DC61-01215B This is a Samsung replacement part Part Number DC61-01215B This is an O.E.M. part\n "}, {"role": "assistant", "content": "7.36"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: ForeverPRO 318242221 Knob for Electrolux Cooktop (AP3960421) 1197681 AH1529034 EA1529034\n Description: ForeverPRO Cooktop Knob Part Number 318242221 (AP3960421) replaces 1197681 AH1529034 EA1529034 PS1529034Fits Electrolux Cooktop. Compatible with Electrolux Frigidaire Gibson Kelvinator Westinghouse and others This is not a Electrolux OEM product. Use of the Manufacturers trade names and logos are the registered trademarks of their respective owners. Any use of the Manufacturers brand name, part numbers or model designation for this product is made solely for purposes of demonstrating and for identification compatibility and are displayed for descriptive purposes only. Use of them does not associated with, imply any affiliation or endorsement by any manufacturer.Compatible with E36GC70FSS1 E36GC70FSS2\n Features: \u2705 Easy to Install - Made Exactly to Fit For Most Top Brand Cooktops \u2705 No Questions Asked Money Back Guarantee. Proud USA Based Company. Comes with 1 Year Warranty or 90 Day Returns \u2705 PRO Grade Premium Knob - Meets or Exceeds OEM Specifications Quality. Comes Brand New in Original Retail Packaging \u2705 ForeverPRO Cooktop Knob Part Number 318242221 (AP3960421) replaces 1197681 AH1529034 EA1529034"}, {"role": "assistant", "content": "81.4"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Samsung DA97-15560A Assy Guard-REF Right\n Description: Samsung DA97-15560A assy guard-ref right\n Features: This Is An O.E.M. Authorized Part Fits With Various Samsung Brand Models Oem Part # Da97-15560A Country Of Origin: Korea, Republic Of (South)\n "}, {"role": "assistant", "content": "80.97"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: SAMSUNG DA63-02183A Refrigerator Ice Maker Thermostat Cover Genuine Original Equipment Manufacturer (OEM) Part White\n Description: Samsung DA63-02183A Refrigerator Ice Maker Thermostat Cover\n Features: Ice maker thermostat cover DA63-02183A shields the ice maker thermostat Genuine Original Equipment Manufacturer (OEM) part. Compatible Brands: Samsung This ice maker thermostat cover (part number DA63-02183A) is for refrigerators Safely store any food that could deteriorate while the power is off and unplug the refrigerator before installing this part\n "}, {"role": "assistant", "content": "8.1"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Pack of 16 Compatible with GE WB2K101 Gas Range Burner Grate Feet, Rubber, Foot for General Electric WB02T10461 AP2622260 PS241358 By Wadoy\n Description: 16 pack of Replacement Gas Range Rubber Feet Compatible with GE WB2K101 FEATURES: - Compatible with following: General Electric, Kenmore. Replace WB2K101 AP2622260 PS241358 WB02T10461 - Direct replacement for a proper fit, easy to install. Our grate rubber is a direct replacement for the Cooktop on your Kitchen - Fits in a 3/16\" hole - Made entirely of rubber WHERE IS IT INSTALL? - The grate foot pad attaches to the bottom of the burner grate to prevent the cooktop from being scratched. WHY DO YOU NEED TO REPLACE GAS RANGE RUBBER FEET? - It protects the stove top by cushioning the grate on your gas range. Over time, these feet may crack or deteriorate, and you will need to replace them. WARM TIPS: - Before beginning this repair, ensure that the surface is cool to the touch. REFUND POLICY: Generic Aftermarket Parts - 30 Day Money Back Guarantee.\u00a0If the products are damaged in transit, or defect products, we will provide free return policy. The product is not sponsored or endorsed by ,or affiliated with the brands it fit ,including GE, General Electric,"}, {"role": "assistant", "content": "8.56"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Tower Manufacturing 30438003-01 15' In-Line GFCI w/Flying Leads\n Description: Tower's 15 ft. In-line GFCI with flying leads Model 30438003 is a GFCI with 15 feet 14/3 flying leads. Ideal for adding or replacing GFCI protection to electrical applications that are used outdoors or wet locations. This light weight, portable GFCI is ready to be wired to your device. The bright \"Red\" light indicates when the power is \"ON\". The TEST and RESET buttons allow for periodic testing. Specifications: - Class \u201cA\u201d people protection GFCI - Rated for 125 volt, 15 amp use - 1875 watts, 60 Hz - LED Power \u201cON\u201d indicator - Open neutral and ground neutral protection - Operating temperature range: -35\u00b0 C to 66\u00b0 C - Impact-resistant case Popular Applications: - Hot tub replacement cord - Spa replacement cord\n Features: 14/3 AWG SJTW cord Trip level 4-6 Ma. Trip response time: less than 25mS UL listed & UL listed to Canadian Safety Standards Automatic reset UL rainproof rated for outdoor use\n "}, {"role": "assistant", "content": "49.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Silverware Basket WPW10473836 PS8759368 W10473836 for Whirlpool Dishwasher\n Description: Replaces the following part numbers:W10473836, W10195723, 3020617, PS8759368, W10195722\n Features: Silverware Basket WPW10473836 PS8759368 W10473836 for Whirlpool Dishwasher\n "}, {"role": "assistant", "content": "72.98"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Delonghi 5532110300 Water Test Strip\n Description: This is an authorized aftermarket product. Fits with various delonghi brand models. It has a oem part # 5532110300.\n Features: This Is An O.E.M. Authorized Part Fits With Various Delonghi Brand Models Oem Part # 5532110300 Brand Name: Delonghi\n "}, {"role": "assistant", "content": "6.0"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: GENUINE Whirlpool 4393849 Support Cap\n Description: Product Description This is a Genuine Replacement Part, The Model Number and Name for The Following Item: Whirlpool (WHIRA) 4393849 Support Cap. From the Manufacturer This is a Genuine Replacement Part,The Model Number and Name for The Following Item:Whirlpool (WHIRA) 4393849 Support Cap\n Features: Whirlpool (WHIRA) Genuine Replacement Part Refrigerator-replacement-parts\n "}, {"role": "assistant", "content": "6.25"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: EXPW10536347 Drain Pump (Replaces W10536347 AP5650269 2392433 8542672 PS5136124 W10049390 W10155921 W10217134 ) For Whirlpool, Maytag\n Description: Washer Drain Pump Replaces W10536347, 2392433, 8542672, W10049390, W10155921, W10217134, W10281682, AP5650269, PS5136124\n Features: Washer Drain Pump Replaces W10536347, 2392433, 8542672, W10049390, W10155921, W10217134, W10281682, AP5650269, PS5136124 Quality Replacement parts by XPARTCO Fits OEM Standards! Guaranteed to Exceed OEM Requirements! In stock, Ships Fast\n "}, {"role": "assistant", "content": "56.9"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Beitiny Egg Holder for Refrigerator, Egg Storage Container Clear Plastic Fridge Egg Organizer with 2 Drawers, 40 Grid\n Description: Specification : - Material: plastic - Color: clear - Product Size: 10.43 x 8.46 x 6.49 inch Package Included : 1 x Beitiny Egg Container for Refrigerator(Not Include Eggs)\n Features: Egg Organizer for Refrigerator: made of food-grade plastic, dustproof and eco-friendly; easy to clean with a sponge or wet cloth, not suitable for dishwasher. Egg Holder with 2 Drawers: measures 10.43 x 8.46 x 6.49 inch, holds up to 40 eggs, each layer holds 20 eggs, Egg Groove Design well protects your eggs against getting crushed or smashed. Clear Egg Holder for Fridge: clear design offers you an open view of the displayed eggs, perfect for fridge, freezer, pantry, refrigerator, kitchen cabinets, and countertop. Plastic Egg Holder: the drawers are easy to open and close with the smooth glide track design, easy for you to neatly organize your refrigerator without any loose eggs or flimsy egg cartons. Customer Service: simply ask us for the online service if there are any questions about our egg storage container, we will solve your problem within 24 hours.\n "}, {"role": "assistant", "content": "18.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: American Range R14020 Bake Oven Arrob/Arrsb Burner\n Description: Product Description R14020, BURNER, BAKE OVEN ARROB/ARRSB. American Range Genuine OEM replacement part. American Range provides high quality restaurant and hotel ranges and other professional kitchen products. Use genuine OEM parts for safety reliability and performance. From the Manufacturer R14020, BURNER, BAKE OVEN ARROB/ARRSB. American Range Genuine OEM replacement part. American Range provides high quality restaurant and hotel ranges and other professional kitchen products. Use genuine OEM parts for safety reliability and performance.\n Features: Genuine OEM replacement part American Range provides high quality restaurant and hotel ranges and other professional kitchen products Use genuine OEM parts for safety reliability and performance Country of Origin: UNITED STATES\n "}, {"role": "assistant", "content": "44.43"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Smooth Top Range Stove Burner for General Electric GE Hotpoint WB30T10047\n Description: Part Number WB30T10047 (AP2027789) replaces 770141, AH243905, EA243905, PS243905, WB30K5033, WB30T10006.\n Features: Part Number WB30T10047 (AP2027789) replaces 770141, AH243905, EA243905, PS243905, WB30K5033, WB30T10006.\n "}, {"role": "assistant", "content": "93.0"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Prtst 502-111A BEVERAGE AIR 502-111A Control - Temperature\n Description: Product Description 502-111A, CONTROL - TEMPERATURE. Beverage Air Genuine OEM replacement part. Beverage Air offers industry leading quality in commercial refrigeration equipment designed for the food service industry. Use genuine OEM parts for safety reliability and performance. From the Manufacturer 502-111A, CONTROL - TEMPERATURE. Beverage Air Genuine OEM replacement part. Beverage Air offers industry leading quality in commercial refrigeration equipment designed for the food service industry. Use genuine OEM parts for safety reliability and performance.\n Features: Genuine Oem Replacement Part Beverage Air Offers Industry Leading Quality In Commercial Refrigeration Equipment Designed For The Food Service Industry Use Genuine Oem Parts For Safety Reliability And Performance From The Brand Name: Beverage Air\n "}, {"role": "assistant", "content": "74.78"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: GE MWF SmartWater Compatible By Best Choice Water Filters Certified Refrigerator Replacement Cartridge Fits MWFA, MWFP, GWF, GWFA, Kenmore 9991, 46-9991, 469991 (2-Pack)\n Description: Best Choice Water Filters will provide you with high quality drinking water and Ice for up to 6 months. Coconut carbon media reduces the many contaminants found in tap water. Reduces Class 1 particulates down to .52 microns. Designed to meet or exceed original equipment filtration standards. Filters have been tested to comply with NSF/ANSI standard 42 for the reduction of chlorine tastes and odors. Best Choice Filters offer Premium Certified and Tested Quality at a discounted price. Quality water you can count on for 6 months. Compatible with: GE MWF MWFA WSG-1 MWF-INT PL-100 EG-1 PG-MWF MWFP\n Features: Best Choice Water Filters Are A Healthier Choice For Less Money \u2014 OR YOUR MONEY BACK! Unconditional 100 percent money back guaranty! Easy installation and operation that has a 6 month and 300 Gallon Capacity REMOVES MORE DANGEROUS CONTAMINANTS \u2013 like lead, cysts, mercury, turbidity, benzene, rust & corrosion, dirt, sediment, chlorine taste and odor, silt, and turbidity PREMIUM BRAND THAT COST LESS \u2013 Designed to meet or exceed"}, {"role": "assistant", "content": "20.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Manitowoc Ice 000002106 Sump Trough\n Description: Product Description 000002106, Sump Trough, Manitowoc Beverage provides state of the art ice machines for the foodservice and beverage industry From the Manufacturer 000002106, Sump Trough, Manitowoc Beverage provides state of the art ice machines for the foodservice and beverage industry\n Features: Genuine OEM replacement part Manitowoc Beverage provides state of the art ice machines for the foodservice and beverage industry Use genuine OEM parts for safety reliability and performance\n "}, {"role": "assistant", "content": "113.36"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: HASMX 2 Pack Replacement Humidifier Filter Wick Filters for Bemis 1041 Aircare Essick Air Bemis CB41 Replacement Parts- 16-5/8\u201d x 9-7/8\u201d x 5\u201d\n Description: High Quality Humidifier Wick Filters for Bemis 1041 High Output Interwoven Filter Design Traps and Retains Mineral Deposits Natural and Clean Humidification - No White Dust Approximate Measurements: 16-5/8\u201d x 9-7/8\u201d x 5\u201d Package Includes: 2 X Humidifier Filter Wick for Bemis 1041 Replacement Every product from HASMX will enjoy 30 days Money-back and 18-Months worry-free warranty;\n Features: High Quality Humidifier Wick Filters for Bemis 1041 - High Output Interwoven Filter Design Natural and Clean Humidification - No White Dust Approximate Measurements: 16-5/8\u201d x 9-7/8\u201d x 5\u201d Package Includes: 2 X Humidifier Filter Wick for Bemis 1041 Replacement Every product from HASMX will enjoy 30 days Money-back and 18-Months worry-free warranty;\n "}, {"role": "assistant", "content": "62.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Waterfall Filter - Refrigerator Water Filter Compatible with GE MWF SmartWater Water Filter Cartridge\n Description: Waterfall Filter - Refrigerator Water Filter Compatible with GE MWF SmartWater Water Filter Cartridge\n Features: Refrigerator Water Filter Compatible with GE MWF SmartWater Water Filter Cartridge Compatible with GE MWF, GWF, GWFA, GWF01, GWF06, MWFA. Very easy to install with clear instructions. Works with a wide-range of GE models High Quality Waterfall Filter Brand Product\n "}, {"role": "assistant", "content": "24.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: GE WB04T10086 Range Oven Door Gasket\n Description: The GE WB04T10086 is a genuine OEM Oven Door Gasket for Ranges that creates a seal between the oven door and the opening of the oven to prevent heat from escaping when the oven is closed. The WB04T10086 replaces the following part numbers: WB04T10001, WB4T10001. It is recommended that either the manufacturer of your appliance or the service manual for your appliance be referenced prior to selecting a part for replacment to insure that the correct part is purchased.\n Features: The GE WB04T10086 is a genuine OEM Oven Door Gasket for Ranges This GE Oven Door Gasket creates a seal between the oven door and the opening of the oven to prevent heat from escaping when the oven is closed The GE WB04T10086 can be applied to some Ranges of the following brands: GE, Kenmore, Kenmore Elite The WB04T10086 replaces the following part numbers: WB04T10001, WB4T10001 Have confidence when making repairs or servicing your appliances with genuine GE parts\n "}, {"role": "assistant", "content": "41.68"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: W10120998 Dryer Lint Screen Replacement for Whirlpool WED9150WW1 - Compatible with 8066170 Lint Screen Filter Catcher\n Description: UpStart Components Replacement W10120998 Dryer Lint Screen for Whirlpool WED9150WW1Please note: This is an UpStart Components Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by UpStart Components.\n Features: UpStart Components Replacement W10120998 Dryer Lint Screen for Whirlpool WED9150WW1 Ultra durable, high quality material resists wear and tear over time. Easy at-home installation. An affordable way to extend the life of your machine. Please make sure to check your original part to confirm that you are buying the correct product. Compatible 8066170 Lint Screen Filter Catcher for Part Number W10120998, AP3967919, 1206293, 3390721, 8066170, 8572268, AH1491676, EA1491676, PS1491676, W10049370, W10120998VP, W10178353, W10596627\n "}, {"role": "assistant", "content": "9.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Basket-Style Gold Tone Coffee Filters designed for Mr. Coffee 10-12 cup basket-style coffeemakers, 2 Pieces\n Description: Generic Basket-style gold tone permanent filter is compatible with most Mr Coffee 10-12 cup basket-style coffeemakers. No Retail Box. Bulk packaging.\n Features: High quality permanent coffee filters with solid bottom which fit Mr Coffee 10-12 cup basket-style coffeemakers Cleans easily under running water Reusable stainless-steel, golden-mesh filter helps conserve natural resources and protect environment. Dishwasher-safe\n "}, {"role": "assistant", "content": "7.9"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: shyness 51mm 2/4 Cups Filter Replacement Filter Basket for Coffee Bottomless Portafilter for Espresso Machine Parts\n Description: shyness :1. Pour hot water into the cup, and do not the relief valve.2. Pour coffee (recommended grinding) into the cup. the chopsticks or beans spoon to the .3. Slightly filter the filter paper, affixed to the filter and screw up the .4. Spin on the (to tighten the pressure will not leak out). Do not rotate the handle of the pot, then it is easy to spin.5. with a lamp or an alcohol stove. It is easy to the hot if you hot water.6. When coffee out, turn it into a small fire ('t let it rush out quickly).7. Then slowly boil the coffee.Colour:SilverMaterial:stainless steelSize:51mm Contents:1 x 2 Cup Filter Basket1 x 4 Cup Filter BasketMaintenance:1. first , wash and dry the funnel with white vinegar and water.2.When using, avoid collision with sharp objects, so as to avoid scratches.3. After using, wash with a little neutral or alkaline detergent, dry with a cloth, keep dry and clean.4.Avoid dry burning.Only the above content, other are not included.Note: Light and different displays may the color of the item in the a little different from"}, {"role": "assistant", "content": "7.58"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 241509402 Evaporator Fan Motor Replacement for Frigidaire EI23BC30KS3 Refrigerator - Compatible with 241509402 Evaporator Motor - UpStart Components Brand\n Description: UpStart Components Replacement 241509402 Evaporator Fan Motor for Frigidaire EI23BC30KS3 RefrigeratorPlease note: This is an UpStart Components Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by UpStart Components.\n Features: UpStart Components Replacement 241509402 Evaporator Fan Motor for Frigidaire EI23BC30KS3 Refrigerator Ultra durable, high quality material resists wear and tear over time. Easy at-home installation. An affordable way to extend the life of your machine. Compatible 241509402 Evaporator Motor for Part Number 241509402, AP3958808, 1196443, 241509401, 7241509402, AH1526073, EA1526073, PS1526073\n "}, {"role": "assistant", "content": "15.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Delfield 1702474\n Description: Product Description 1702474, 27\" DOOR GASKET (4400 SERIES) 25.34 X 25.57 (TRIPLE DART). Delfield Genuine OEM replacement part. Delfield has over 50-years of industry experience and provides commercial foodservice equipment. Use genuine OEM parts for safety reliability and performance. From the Manufacturer 1702474, 27\" DOOR GASKET (4400 SERIES) 25.34 X 25.57 (TRIPLE DART). Delfield Genuine OEM replacement part. Delfield has over 50-years of industry experience and provides commercial foodservice equipment. Use genuine OEM parts for safety reliability and performance.\n Features: Genuine OEM replacement part Delfield has over 50-years of industry experience and provides commercial foodservice equipment Use genuine OEM parts for safety reliability and performance\n "}, {"role": "assistant", "content": "40.49"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: GE Part Number WR30X10104 ASM ICE MAKER\n Description: Genuine Original Equipment Manufacturer (OEM) parts! This ice maker assembly (part number WR30X10104) is for refrigerators. Ice maker assembly WR30X10104 contains the complete ice maker and housing. The assembly may include multiple parts; refer to your parts diagram for a complete list of parts included. Safely store any food that could deteriorate while the power is off and unplug the refrigerator when installing this part. Wear work gloves to protect your hands.\n Features: This part is compatible with models including; GFSF6KEXABB,GFSF6KEXACC,GFSF6KEXAWW,GFSL6KEXBLS,GFSL6KEXALS,GFSM6KEXBBG,GFSM6KEXABG,GFSF6KEXBBB,GFSF6KEXBCC,GFSF6KEXBWW,GFSS6KEXBSS,GFSS6KEXASS,GFSS6KIXBSS,GFSS6KIXASS Ice maker assembly WR30X10104 contains the complete ice maker and housing Genuine Original Equipment Manufacturer (OEM) part. Compatible Brands: Ge This ice maker assembly (part number WR30X10104) is for refrigerators The assembly may include multiple parts; refer to your parts diagram for a complete list of"}, {"role": "assistant", "content": "96.88"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: GOLDTONE #2 Cone Style Pour Over Coffee Dripper, Portable Pour Over Coffee Filter BPA-Free (1-6 Cups) And Scoop\n Description: Introducing GOLDTONE\u2019s sturdy portable pour over coffee filter cone for all your manual coffee brewing desires! Our non breakable, solid pour over coffee filter is ideal for your kitchen, office, or camping and hiking adventures; Sporting a wide base with a flat bottom which allows maximum filter capacity, thus, brewing you a delicious gourmet cup of coffee! Made from BPA Free plastic, our coffee dripper is durable, easy to clean and will last a lifetime with proper care.\n Features: EASY TO USE: Set on top of you cup or mug, load the top with a #2 compatible filter, put in your coffee grounds and slowly pour hot or boiling water into the top - coffee will slowly drip through the three holes in the bottom until complete and ready to drink. PRACTICAL: Once you\u2019re done brewing your coffee, discard the coffee grounds, rinse your dripper, and allow it to dry. Our coffee dripper has a strong frame and a useful handle simulating a regular cup or mug, making an easy process for an intricate cup of coffee. SAFETY FIRST: Our BPA Free plastic does not absorb coffee odors or taste and will not transfer a plastic or chemical taste to your brew. CONVENIENT: Features a non-breakable and portable design for"}, {"role": "assistant", "content": "8.89"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: LG ADQ73233901 Filter Assembly, Air Cleaner\n Description: This is an authorized aftermarket product. Fits with various LG brand models. It has a oem part # ADQ73233901.\n Features: This Is An O.E.M. Authorized Part Fits With Various Lg Brand Models Oem Part Adq73233901 From The Brand Name: Lg\n "}, {"role": "assistant", "content": "24.53"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: EAGLEGGO Compatible Drum Belt for Maytag MDE5500AYW, Maytag MDE7057AYW, Maytag MDG9206AWW, Maytag MLE23MNFYW Dryer\n Description: How to install the drum belt Remove top panel. Remove the screws, push and lift the top off. Then see if you can correctly place the belt around the drum where it has wear marks as ridden there before. Then transfer the slack to the bottom motor area. Lift and route the belt around the tensioner and the grooved belt switch area. While holding back tension on the pulley, place the belt into the motor pulley . Release tensioner and rotate the drum slowly to the left so it will align belt routing and not jump track. Warming tips: Please make sure to check your original part to confirm that you are buying the correct product. Compatibility: Compatible with Samsung, Whirl-pool, May-tag, Crosley dryer. Replaces Part Number: 33002535, WP33002535, 33001777, 63700300, AP6007983, ER33002535, PS11741110, WP33002535VP, 341241, 8066065, 53-2910, 3394651, 695055, 31531589, 53-2671, 349533, 694088. Fit"}, {"role": "assistant", "content": "11.39"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Gxcdizx 1 Pc Refrigerator Compressor Start Relay and Capacitor W10613606 - Exact Fit for Whirlpool KitchenAid Kenmore fridges - Repl. W10416065, PS8746522, 67003186\n Description: Gxcdizx is a Brand of Aftermarket Automotive Part. As a Professional Provider of Auto Parts. We Maintain High Standards of Excellence and Strive for 100% Customer Satisfaction. W10613606 Compressor start relay and capacitor includes both the run capacitor and the start relay. The capacitor helps the compressor kick on and off while maintaining a constant temperature to keep things frozen in your freezer. The start relay boosts the compressor, and then shuts off as soon as the motor gets up to speed and the overload provides extra protection against excessive temperatures. Works with the following models: for Kenmore 59653463301, 59653463302, 59653464300, 59653464301, 59653464302 for Whirlpool EB9FVBLVS00, EB9FVBRVS00, EB9FVBXVB00, EB9FVBXVQ00 Replaces part numbers: 14217273, 67003186, 67003764, 67005560, 67005561, 67005562, 8171210, 8208290, 8208368, C8931605, W104160"}, {"role": "assistant", "content": "12.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 4 Pack 154174501 Dishwasher Wheels Bracket Assembly Replacement for Frigidaire Kenmore Tappan Gibson Westinghouse Dishwasher 154174401 5300809640 154294801 AP2135554 PS452448\n Description: 4 Pack 154174501 Dishwasher Wheels Bracket Assembly Replacement for Frigidaire Kenmore Tappan Gibson Westinghouse Dishwasher 154174401 5300809640 154294801 AP2135554 PS452448\n Features: Non-OEM Replacement Part Fits for most top name brands Frigidaire, Kenmore/Sears,Electrolux, manufactured dishwasher models, also including Gibson Kelvinator Tappan White Westinghouse . Replaces Part Numbers: 5300809640, 154174501, 154174502, 154294801, 3202777, 612977, AH452448, AP2135554, EA452448, PS452448. Package includes: 4 Pack Dishwasher Wheels & Bracket Assembly 154174501 RISK FREE - If you are not satisfied with the 154174501 Dishwasher Wheels Bracket Assembly for any reason,please contact us for a replacement or refund in the limited time.\n "}, {"role": "assistant", "content": "9.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Replacement Dryer Timer Knob WE1M964 for General Electric GTDP350GM1WS Dryer\n Description: Replacement Dryer Timer Knob WE1M964 for General Electric GTDP350GM1WS Dryer Please note: This is an UpStart Components Brand replacement part, NOT an OEM product. This product is not affiliated with any OEM brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by UpStart Components. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners.\n Features: Replacement part for 1811122, AP4980845, WE1M964 Replacement knob engineered to fit name brand appliances. Design features high-quality materials for superior durability and extended life. Simple installation lets you get back to your job in a flash. A cost-efficient solution to extend the life of your appliances in just a few easy steps. UpStart Components Brand. One Year Warranty\n "}, {"role": "assistant", "content": "5.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Melitta Cone Coffee Filters White No. 6 40 Count\n Description: Grocery\n Features: Melitta Super Premium Coffee Filters number 6 40 CT. 40 cone filters. Brews better tasting coffee. Fits all 10 cup non-electric coffee makers. Recyclable.\n "}, {"role": "assistant", "content": "20.24"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Refrigerator Evap Motor 4681JB1027N\n Description: 4681JB1027N fits 300+ Kenmore models including: 79568,79569,79571,79575,79576,79577,79578,79579; and these LG models: LBC20514TT LBC22518ST LBC22518WW LBC22520SB LBC22520ST LBC22520SW LBC22520TT LBN22515SB LBN22515ST LBN22515WW LDC22720ST LDC22720SW LDC22720TT LDN22735SB LDN22735ST LDN22735SW LFC20740ST LFC20740SW LFC20760SB LFC20760ST LFC20760SW LFC20770SB LFC20770ST LFC20770SW LFC22760ST LFC22760SW LFC22760TT LFC23760SB LFC23760ST LFC23760SW LFD22860SB LFD22860ST LFD22860SW LFD22860TT LRBC22544SB LRBC22544ST LRBC22544WW LRDC20731ST LRDC20731SW LRDC20731WW LRDN22734SB LRDN22734ST LRDN22734TT LRDN22734WW LRFC22750ST"}, {"role": "assistant", "content": "28.5"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Refrigerator Compressor Start Relay Overload Capacitor fits Whirlpool W10613606\n Description: Description: ---Aftermarket refrigerator compressor start device and capacitor replaces for Whirlpool, Sears, Kenmore, Estate, Roper, KitchenAid,W10613606. ---This includes both the run capacitor and the start relay. Feature: ---The capacitor helps the compressor kick on and off while maintaining a constant temperature to keep things frozen in your freezer. ---The start relay boosts the compressor, and then shuts off as soon as the motor gets up to speed and the overload provides extra protection against excessive temperatures. Replaces part numbers: W10613606, AP5787784, 67005560 ,3023300 ,67003186 ,67003764, 67005561 ,67005562 ,8171210 ,8208290 ,8208368 ,C8931605 ,PS8746522 ,W10416065, W10613606 Fitment: For Whirlpool, Sears, Kenmore, Estate, Roper, KitchenAid and some other refrigerator brands. Package Include: 1x Capacitor 1x Relay\n Features: Description: ---Aftermarket refrigerator compressor start device and capacitor replaces for Whirlpool, Sears, Kenmore, Estate, Roper, KitchenAid,W10613606. ---This includes both the run capacitor and the start relay. Feature: ---The capacitor helps the compressor kick on and off"}, {"role": "assistant", "content": "11.98"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Refresh Replacement for Samsung Aqua-Pure Plus DA29-00003G, DA29-00003A, DA2900002B, DA2900003, DA2900003F, DA290002, HAFCU1, HAFIN2 and Waterdrop WD-DA-29-00003G Refrigerator Water Filter (4 Pack)\n Description: Why Refresh? Because quality and value are our top priorities. Buy with confidence from Refresh and refresh your water today! Refresh your family's water with a premium Refresh brand refrigerator water filter. Save big by purchasing a Refresh filter at up to 50% less than the manufacturer part, and save more by purchasing a 2 pack, 3 pack, or 4 pack! This Refresh Filter is compatible with Samsung Water Filter Models: DA29-00003G, DA29-00003A, DA29-00003A-B, DA29-00003B, DA29-0003B, DA2900003A, DA2900003B, DA61-00159, DA61-00159A, DA61-00159A-B, DA61-159, DA97-06317A, TADA29-00003A, TADA29-00003B This Refresh Filter is also compatible with these Filter Models: Purity Pro PF04, AP4444333, Aquafresh WF289, Clear Choice CL"}, {"role": "assistant", "content": "49.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 3395382 - OEM Upgraded Replacement for Kenmore Dryer Start Switch\n Description: This is a Brand New OEM Dryer Start Switch\n Features: This is a Brand New OEM Dryer Start Switch Top Quality OEM Replacement Part!\n "}, {"role": "assistant", "content": "40.65"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Replacement for Samsung RS267LASH Refrigerator Water Filter - Compatible with Samsung DA29-00003G, Samsung DA29-00003B, Samsung DA29-00003A Fridge Water Filter Cartridge\n Description: This is a Denali Pure Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any OEM brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by Denali Pure.\n Features: Replacement for DA29-00003G Filter\n "}, {"role": "assistant", "content": "13.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Frigidaire 241872505 Freezer Door Gasket for Refrigerator\n Description: From the Manufacturer Frigidaire 241872505 for Freezer Door Gasket for Refrigerator, White. This part works with the following models: Frigidaire CRT216HLQ1, Frigidaire CRT216HLW1, Frigidaire CRTE217AQ2, Frigidaire CRTE217AQ3, Frigidaire CRTE217AW2, Frigidaire CRTE217AW3. Genuine Replacement Part.\n Features: This part works with the following models: Frigidaire CRT216HLQ1, Frigidaire CRT216HLW1 Frigidaire CRTE217AQ2, Frigidaire CRTE217AQ3 Frigidaire CRTE217AW2 Frigidaire CRTE217AW3 Genuine Replacement Part\n "}, {"role": "assistant", "content": "122.0"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Southbend Range 1034900 Left Door Hook\n Description: Product Description South bend Range 1034900 Left Door Hook, For over one hundred years, South bend has produced the finest in heavy-duty ovens, ranges and steamers. From the Manufacturer Southbend Range 1034900 Left Door Hook , For over one hundred years, Southbend has produced the finest in heavy-duty ovens, ranges, and steamers\n Features: Genuine OEM Replacement part For over one hundred years, South bend has produced the finest in heavy-duty ovens, ranges and steamers Use genuine OEM parts for safety reliability and performance Model number: 1034900\n "}, {"role": "assistant", "content": "13.11"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: LG AAP74471301 Dishwasher Silverware Basket Genuine Original Equipment Manufacturer (OEM) Part\n Description: Genuine Original Equipment Manufacturer (OEM) parts! This silverware basket (part number AAP74471301) is for dishwashers. Silverware basket AAP74471301 rests in the lower dishrack and holds small utensils such as forks and knives during the dishwashing cycle. Follow the instructions in your owner's manual when installing this part.\n Features: This part is compatible with models including; 72213383910,72214305910,LDF5545WW/00,LDP6797ST/00,72214307910,LDP6797BB/00,LDT5665ST/00,LDT5678BD/00,LDP6797BD/00,LDF5545BD/00,LDT7797ST/00,LDF5545ST/00,LDP7708ST/00,LDT7797BD/00,72214673710,LDF5678ST/00,72214677710,LDT5678ST/00,LDF5545BB/00,LDT5665BB/00,LDT5665BD/00,LDP6797WW/00,LDT7808ST/00,72213387910,72214357910,72214355910 Silverware basket AAP74471301 rests in the lower dishrack and holds"}, {"role": "assistant", "content": "64.9"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Edgewater Parts W10290350 8-inch Drip Pan Compatible with Whirlpool\n Description: NON-OEM Replacement W10290350: DRIP PAN BLACK FOR Whirlpool RANGE\n Features: NON-OEM Replacement\n "}, {"role": "assistant", "content": "8.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: DD81-02132A DD81-01629A Dishwasher Door Switch Replacement for Samsung Dishwasher Parts, Samsung Dishwasher Door Lock, Fit DW80K5050, DW80K5050UB\uff0cDW80R5060US DW80R5061UG DW80F600UTW DW80K7050UG\n Description: DD81-01629A DD81-02132A compatible samsung Dishwasher Door Switch Latch: Compatible with: For samsung Dishwasher Door Lock DW80K5050UB\uff0cDW80R5060US DW80R5061UG DW80F600UTW DW80K7050UG DW80J3020US DW80K5050 etc... Fit Models: DW80J3020UB/AA-00, DW80K5050US/AA-00, DW80J3020UW/AA-00, DW80K7050US/AA-00 ,DW80R5061UT, DW80K5050UB/AA-00, DW80F600UTW/AA-00, DW80F600UTW/AA-01, DW80K7050UG/AA-00, DW80F600UTB/AA-00, DW80F600UTB/AA-01, DW80J3020US/AA-00, DW80F800UWS/AA-01, DW80F800"}, {"role": "assistant", "content": "25.49"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Bosch 00263096 Seal-Door\n Description: This is an authorized aftermarket product. Fits with various Bosch brand models. Oem part # 00263096.\n Features: This is an O.E.M. Authorized part Fits with various Bosch brand models Oem part # 00263096\n "}, {"role": "assistant", "content": "48.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: MORE Pure MPF15020 Replacement Refrigerator Water Filter Compatible with GE MWF SmartWater\n Description: MORE Pure MPF15020 Premium Water Filter: When it comes to water and ice dispensing from refrigerators, strange flavors or contaminants are troubling to many people. With a MORE Pure water filter for GE refrigerator appliances, these concerns are neutralized. Buy with confidence! Each filter is NSF/ANSI 42 certified to reduce the flavor of chlorine in the water. Additionally, these filters have been independently tested and proven to reduce lead, mercury, cadmium, and thallium levels by up to 99.9%, giving you cleaner, purer water and ice with a crisp, refreshing flavor. MORE Pure water filters for GE refrigerators deliver top-quality results for less. Unlike other comparable filters on the market, MORE Pure filters don\u2019t require you to break the bank for clean water. Recipient of the Water Quality Association (WQA) Gold Seal for product quality and excellence. These versatile filters are designed to work well with a number of GE refrigerators, including the following part numbers: MWF MWF3PK MWFA MWFAP MWFDS MWFINT 469991 469996 AP3859302 AP3967843 EFF-6013A EG-1 FMG-1 GERF-100 GWF GWF01 GWF06 GWFA GWFDS HWF HWFA RFC0600A"}, {"role": "assistant", "content": "21.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 49572A LP Propane Gas Dryer Conversion Kit compatible with Whirlpool\n Description: DESCRIPTION This Gas Dryer Conversion Kit can be used to convert your natural gas dyer to use liquid propane. This kit includes (2) burner orifices, (1) regulator vent cap and (1) LPG conversion decal. This is a universal accessory that can be used across several brands; check to see if your model number is compatible. Installing this accessory will require basic hand tools, complicated disassembly of the dryer and prior repair experience. Consider hiring a qualified technician to install this conversion kit.\n Features: \u3010Perfect Replacement\u3011For Whirlpool 49572A Gas Conversion Kit,OEM Part #49572A \u3010Widely Applicable\u3011It is compatible with Whirlpool, Maytag, KitchenAid and other Whirlpool brands. \u3010Function\u3011This LP Gas Dryer Conversion Kit can be used to convert your natural gas dyer to use liquid propane. \u3010Buy With Confidence\u3011We offer 30-day returns for any reason. To initiate a return, please navigate to your orders page. \u3010IMPORTANT NOTE\u3011 Please check the compatibility with your previous part and appliance's model before ordering the replacement.\n "}, {"role": "assistant", "content": "13.75"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: DPD 137221600 Washer Drain Pump Replacement for Frigidaire, Westinghouse, Kenmore, Gibson - Replaces 137108100 134051200 137151800,131724000,134740500,PS7783938,PS2342445,AP5684706, 2754548\n Description: Replaces the following part numbers: AP5684706, 2754548, 137221600, 131724000, 134051200, 134740500, 137108100, 137151800, 137151800KITK,PS7783938,PS2342445. Works for brands: Frigidaire, Westinghouse, Kenmore, Gibson, Crosley, Uni, Electrolux This part fixes the following symptoms: Will not drain Noisy Leaking Pumps but will not spin Contact Us If you are not sure if part is correct, ask us in Customer questions & answers section or contact us by visiting the Discount Parts Direct storefront. Business Wholesale We are a small local company from Houston, Texas offer discount parts for retail and wholesale. If you need to purchase parts for business , please contact us for lower rates.\n Features: Parts Number: 137221600, Replaces: AP5684706, 2754548, 137221600, 131724000, 134051200, 134"}, {"role": "assistant", "content": "20.47"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Mintu Upper Rack Adjuster Replacement For KitchenAid KDTM354DSS4 KDTE104DSS0 KUDE60HXSS1 KDTM354DSS5 KDTE104DWH0 KUDE60HXSS6 DishWasher\n Description: Package Included: 2 x Dishwasher rack adjuster 2 x adjuster positioner 2 x Rack Adjusters 2 x adjuster arm clip lock. W10082853 Dishwasher Tine Pivot Clip Use Ctrl + F to SEARCH for your model number Replaces For KitchenAid KDTM354DSS4 KDTE104DSS0 KUDE60HXSS1 KDTM354DSS5 KDTM354EBS1 KDTM354EBS2 KDTM354EBS3 KDTM354ESS0 KDTM354ESS1 KDTM354ESS2 KDTM354ESS3 KDTM384EBS0 KDTM384EBS1 KDTM384EBS2 KDTM384EBS3 KDTM384ESS0 KDTM384ESS1 KDTM384ESS2 KDTE104DBL1 KDTE104DSS1 KDTE104DWH0 KDTE104DWH1 KDTE104EBL0 KDTE104EBL1 KDTE104EBL2 KDTE104EBL3 KDTE104EBL4 KDTE104E"}, {"role": "assistant", "content": "33.49"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Dinosaur Electronics 61716822 Replacement Board for Norcold Refrigerator\n Description: The Norcold part number is usually located on the board. Match the model number along with the board number. (Dinosaur numbers are the same as Norcold except where noted.) Three year warranty registration card included with each board. Model #: 838EG2,8310EG2 DE Board#: 61716822 DE\n Features: Country Of Origin: China Model Number: 61716822 Item Package Dimension: 10.98\" L x 7.32\" W x 3.99\" H Item Package Weight: 4.08 lb\n "}, {"role": "assistant", "content": "100.06"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: (Pack of 18) 7\" x 8-1/4\" Replacement Polyester Filters for The BetterVent Indoor Dryer Vent Made by Airstar, 18 Pack\n Description: Indoor Dryer Vent Replacement Filters for BetterVent 7\" x 8-1/4\" x 1\" Blue & White Polyester Filter Pads 7\" x 8-1/4\" x 1\" Blue & White Polyester Filter Pads Pack of 3 Pack of 3 Capturess Dryer Lint without Restricting Air Flow Capturess Dryer Lint without Restricting Air Flow Made in the U.S.A. Made in the U.S.A. Directions for Use: Step 1: Open and Remove Old Indoor Dryer Vent Filter Step 1: Open and Remove Old Indoor Dryer Vent Filter Step 2: Replace Filter with NEW Airstar Filter with the Blue Side Facing in Toward the BetterVent Indoor Dryer Vent Step 2: Replace Filter with NEW Airstar Filter with the Blue Side Facing in Toward the BetterVent Indoor Dryer Vent Step 3: Close and Latch the Indoor Dryer Vent System Step 3: Close and Latch the Indoor Dryer Vent System Changing this filter pad often will increase the efficiency of your dryer!! Note : Images are for illustration only! All pads are cut within 1/4\" of the listed size. *** Items may be compressed or folded for"}, {"role": "assistant", "content": "20.95"}]}
|
||||||
40
week6/community-contributions/solisoma/validation_data.jsonl
Normal file
40
week6/community-contributions/solisoma/validation_data.jsonl
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: AZH Dishwasher Door Latch Handle Assembly Replacement For Maytag Quiet Series 100 Series 200 series 300 Dishwasher,Maytag PDBL390AWB MDBS561AWW1 PDBL390AWZ MDBH955AWW MDBF550AWB MDB5601AWS Dishwasher\n Description: Replacement For Crosley Models: CDU650AWW Maytag Models: MDB4650AWW, MDB4651AWW, MDB5600AWW, MDB5601AWW, MDB5651AWW, MDB6600AWW, MDB6601AWW, MDB7600AWW, MDB7601AWW, MDB7650AWW, MDB7750AWW, MDB7751AWW, MDB7755AWW, MDB8600AWW, MDB8750AWW, MDB8751AWW, MDB8751BWW, MDB9600AWW, MDB9601AWW, MDB9750AWW, MDBF550AWW, MDBF750AWW, MDBH750AWW, MDBH940AWW, MDBH945AWW, MDBH950AWW, MDBH955AWW, MDBH965AWW, MDBH970AWW, MDBH975AWW, MDBM601AWW, MDBM755AWW, MDBS561AWW, MDBS661AWW, MDBTT50AWW"}, {"role": "assistant", "content": "46.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: GE WD22X10089 Dishwasher Middle Spray Arm Genuine Original Equipment Manufacturer (OEM) Part\n Description: Genuine Original Equipment Manufacturer (OEM) parts! This spray arm (part number WD22X10089) is for dishwashers. Spray arm WD22X10089 rotates and sprays water to clean the dishes inside the dishwasher tub. Wear work gloves to protect your hands during this repair.\n Features: This part is compatible with models including; ADT521PGF0BS,GDT535PGJ2WW,GDF540HGD2WW,ADT521PGJ0WS,DDT575SMF5ES,GDF650SMJ4ES,GDF510PMD4SA,GDT695SBL4TS,GDT695SMJ2ES,GDF570SGF7BB,GDF640HGM0BB,DDT575SGF0BB,GDF520PGJ6BB,GDT655SMJ2ES,GDF511PGM0BB,DDT595SBL5TS,GDT635HGJ0WW,GDT655SFL4DS,GDT680SGH7BB,GDF510PGJ2BB,GDF650SGJ0BB,GDT695SFL4DS,GDF620HSJ2SS,DDT595SFL5DS,GDT535PSJ5SS,GDT655SBL5TS,GDT580SSF7SS,DDT"}, {"role": "assistant", "content": "17.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: prime&swift Replacement fit for GE WR57X10051 Water Inlet Valve with Dual Inlet riv-12ae21 WR57X10032 AP3672839 WR57X98 PS901314 WR57X111 ZIS42NYA CST25GRBCWW\n Description: This replacement fridge icemaker water valve comes with 1/4\" compression inlet.This part comes with new quick connections.To install - cut retaining nuts off of existing plastic water lines and gently push them into new valve.To remove - depress ring that the tube slides into; Works With Models: 39330,39338,39571,39671,BCS42ELB,BCS42ELC,BCS42ELD,BCS42ELE, BISB42EKB,BISB42EKC,BISB42ELB,BISB42ELC,BISB42ELD,BISB42ELE, BISW42EKB,BISW42EKC,BISW42ELB,BISW42ELC etc.; 36358072893,36358075893,36358077893,36358475893,36350221000,36350222000, 36350227000,36357552790,36357552791,36357557790,36357557791,36358042893, 36358042894,36358042896,363"}, {"role": "assistant", "content": "22.39"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Funny Pet Cat Carrying A Mouse Decorative Dishwasher Door Cover Sticker Clear Pattern Panel Decal 23\" W x 26\" H\n Description: This beautiful magnet affixes instantly to the front of your metal dishwasher giving it a custom decorator look. Wipes clean with a dry cloth. Not for use on stainless steel. Paper and magnet. Heat resistant Heat resistant Waterproof Waterproof With a smooth surface that is environmentally safe Size 23\"W x 17\"H;58.5cm W x 43cm H. 23\"W x 26\"H;58.5cm W x 66cm H.\n Features: Material - This cat carrying a mouse funny magnetic panel decal is made of PET vinyl film applied to industrial grade.Water and heat resistant as well as easy to clean and maintain 23 W x 26 H inches magnetic sticker.Easily trimmable to fit your dishwashers This magnetic dishwasher covers hide scratches, dents or other unsightly marks on your dishwasher. Hassle free to install and remove; simply stick/remove It's a great gift to your mother girlfriends sisters chef on Birthday Christmas Holiday\n "}, {"role": "assistant", "content": "34.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Swift Green Filters SGF-LB60 Replacement Refrigerator Water Filter for 5231JA2006B, LT 600P, 5231JA2006A, EFF-6004A, 46-9990, WF300, RWF1051 (1 Pack) Made in USA\n Description: Product Description Swift Green Filters is committed to providing you with the cleanest and healthiest water filtration products for your home and business. The unique carbonization process of the SGF-LB60 Water Filter (Replacement for LG 5231JA2006B, LT 600P and 5231JA2005A) reduces harmful impurities and enhances the quality of your drinking water. All the materials are environmentally friendly, and all filter components are 100% recyclable. From the Manufacturer Swift Green Filters is the green alternative in water filtration. We think that sustainability should be at the forefront of every business model. Our unique carbonization process reduces harmful impurities while improving the quality of your drinking water. We offer a variety of refrigerator and food service filter replacements. Our products are 100% recyclable and all materials used in our products are UL and Gold Seal certified. You can recycle your used filter by shipping it back to us! We are proud to say all our products are made within North America.\n Features: Industry certified to meet NSF & ANSI 42 or 53 standards , This Filters reduces Volatile organic"}, {"role": "assistant", "content": "22.11"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Covered Egg Holder for Refrigerator: Reusable Plastic Egg Carton 18 Egg Storage Carrier Stackable Fridge Egg Tray with Lid Pink\n Description: Description Are you looking for a practical and convenient egg storage box for home? If yes, then you can not miss this product! The egg holder can hold up to large quantities eggs, enough for shop, business and home use. Come and take it home! Features - Material: PP;- Made of food- grade shatter- resistant PP, with lid design, and durable.- The clear egg trays in multi groove design well protects your eggs against getting crushed.- With the lid design makes this box can your egg be broken external.- The slim, compact design effortlessly fits into any refrigerator and place.- Suitable for refrigerator, kitchen countertop, freezer, fridge, kitchen cabinets.- Color: Pink;- Size: 30X15X6.5CM; Package Including 1 x Egg Holder\n Features: pp The clear egg trays in multi groove design well protects your eggs against getting crushed. With the lid design makes this box can your egg be broken external. The slim, compact design effortlessly fits into any refrigerator and place. Suitable for refrigerator, kitchen countertop, freezer, fridge, kitchen cabinets. Made of food- grade shatter- resistant PP, with lid design, and durable.\n "}, {"role": "assistant", "content": "14.69"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Drip Pans 2 WB31M20 6\" and 2 WB31M19 8\" & 2 8-In WB30M2 and 2 6-In WB30M1 Range Stove Burner & WB17T10006 Terminal Block Kit Replacement\n Description: What\u2019s This: Drip Pans 2 WB31M20 6\" and 2 WB31M19 8\" & 2 8-In WB30M2 and 2 6-In WB30M1 Range Stove Burner & WB17T10006 Terminal Block Kit Replacement Replaced Model: WB31M20 Drip Pans replaces: WB31M0020, WB31M20-100PK, WB32X5070, PS244375, AP2028044, EAP244375 WB31M19 Drip Pans replaces: WB31M0019, WB31M19-100PK, WB32X5069, AP2028043, PS244373, EAP244373 ERS30M1 5 turn 6\", 208/240 volts, 1350 watts. Replaces: 2912, AP2634727, PS243867, EAP243867, 340523 CH30M1, WB30M0001, WB30X5071, WB30X5109, WB30X5119, WB"}, {"role": "assistant", "content": "56.43"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 279457 Dryer Heating Element Connecting Wire Kit Replacement Compatible with Whirlpool Replace AP3134638 PS334206 279457\n Description: Hi-temp wire adapting kit. This kit is designed to help an installer with hooking up heating elements properly in case there is a burnt wire, different spade connections, or frayed wire. Features: - Model Name: 279457 Dryer Heating Element Connecting Wire Kit compatible with Whirlpool. - Work with: Compatible with Whirlpool, May-tag, Amana, Admiral, Jenn-Air, Part numbers AP3134638, 279457VP, 3140, PS334206, T2502 - Perfectly to Fix: Designed to adapt new style 4391960 to old style that does not have push on connectors. - Package List: Female spade on this kit is 5/16\". Comes with 2 wires and 2 wire connectors. Please note: This is not a Whirlpool product and is not covered under any Whirlpool manufacturer's promise. The Whirlpool brand names and logos are the registered trademarks of their respective owners. Any use of the Whirlpool brand name or model designation for this product is made solely for purposes of demonstrating compatibility. The product is not sponsored or endorsed by, or affiliated with the brands it fit, including Whirlpool,May-tag, Amana, Admiral, and Jenn-Air.\n Features: \u2665 [ Model Name ] - 279457 Dryer Heating Element Connecting Wire Kit"}, {"role": "assistant", "content": "7.89"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: MTQY 6pcs French Press Replacement Filter Screen 3.8 inch 0.35 inch Hole Stainless Steel Coffee Filter Mesh for French Press Coffee Makers\n Description: Specification: Product: French Press Replacement Filter Screen Diameter: 3.8 inch Hole: 0.35 inch Material: Stainless Steel Package includes: 6 x French Press Replacement Filter Screen Made of high-quality stainless steel, easy to store, use, and clean. It will not rust and the outer edge of the double layer will not wear. Easy to clean, rinse your filter under the tap for a few seconds. Compatibility: our filter press replacement is suitable for most 8-cup coffee press designs.\n Features: Package content: you will receive a total of 6 pieces of filter screens, enough to meet your daily filter replacement needs. You can share them with your good friends and use them in your daily life High-quality materials: our ultra-fine screen is made of high-quality stainless steel, which will not rust and is more durable than ordinary tea and coffee filters. Size compatibility: the size of the replacement filter screen of the French filter press is about. The diameter is 9.7cm / 3.8 inches and the hole is 0.9cm / 0.35 inches. The appropriate size can fit most coffee machines. Please check carefully before selecting. Easy to clean: just wash the French filter"}, {"role": "assistant", "content": "7.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: DC32-00007A Dryer Thermistor Replacement for Samsung DV431AEW/XAA-01 - Compatible with AP4201716 Thermistor Assembly\n Description: UpStart Components Replacement DC32-00007A Dryer Thermistor for Samsung DV431AEW/XAA-01Please note: This is an UpStart Components Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by UpStart Components.\n Features: UpStart Components Replacement DC32-00007A Dryer Thermistor for Samsung DV431AEW/XAA-01 Ultra durable, high quality material resists wear and tear over time. Easy at-home installation. An affordable way to extend the life of your machine. Please make sure to check your original part to confirm that you are buying the correct product. Compatible AP4201716 Thermistor Assembly for Part Number DC32-00007A, AP4201716, 2068429, PS4204984\n "}, {"role": "assistant", "content": "4.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Fette Filter 2 Pack Dryer Lint Screen Catcher | Compatible with Whirlpool W10120998, Kenmore, Maytag Dryers | Premium Quality Lint Screens Part # AP3967919\n Description: ENSURES OPTIMUM PERFORMANCE FROM YOUR CLOTHES DRYER Are you looking for a quality replacement lint catcher for your clothes dryer? Fette Filter pack of 2 lint screens delivers value for your money. They feature an improved design and are built to keep your dryer operating at maximum capacity. Click \u2018Add to Cart\u2019 now to get yours today. The lint catcher screens feature a support strip that reducing the amount of strain on the screen material thus increases its durability and performance. The screens are made from premium quality materials, are easy to clean, and will last a long time. Compatible with many dryer brands Our filter screens are compatible with brands like Kenmore, Whirlpool, Maytag, KitchenAid, Amana, Inglis, Crosley, Admiral, and more. They are made for a perfect fit, and are very easy to replace too. They are replacements for part number W10120998, 3390721, 8066170, 8572268, W10049360, W10049370, W10120998VP, W10178353, W10596627, 1206293, AP3967919, PS1491676, EAP149167"}, {"role": "assistant", "content": "19.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: ForeverPRO 3195546 Front Drawer Glide for Whirlpool Range 504563 AH340079 EA340079 PS340079\n Description: ForeverPRO Range Front Drawer Glide Part Number 3195546 replaces 504563 AH340079 EA340079 PS340079Fits Whirlpool Range. Compatible with Whirlpool Maytag KitchenAid Jenn-Air Amana Magic Chef Admiral Norge Roper and others This is not a Whirlpool OEM product. Use of the Manufacturers trade names and logos are the registered trademarks of their respective owners. Any use of the Manufacturers brand name, part numbers or model designation for this product is made solely for purposes of demonstrating and for identification compatibility and are displayed for descriptive purposes only. Use of them does not associated with, imply any affiliation or endorsement by any manufacturer.Compatible with 4RF302BXEQ1 4RF302BXGQ0 4RF302BXGQ1 4RF302BXKQ0 4RF302BXKQ1 4RF315PXEQ0 4RF315PXGQ0 4RF315PXKQ0 4RF315PXMQ0 CES365HQ0 CES365HQ1 CES365HZ0 CES365HZ1 CES366HQ0 CES366HQ1 CES366HZ0 CES366HZ1 CGS365HQ0 CGS365HQ5 CGS365HQ6 CGS365HQ7 CGS365HQ8 CGS365HZ0"}, {"role": "assistant", "content": "14.48"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Frigidaire 5304486361 Refrigerator Door Handle New\n Description: Genuine Original Equipment Manufacturer (OEM) parts! This manufacturer-approved black door handle set (part number 5304486361) is for refrigerators, including Frigidaire refrigerator model CFTR1826LM0. Follow the instructions in your owner's manual or installation guide for removing door handle 5304486361 from the refrigerator. Wear work gloves to protect your hands when replacing the door handle. For Frigidaire & Kenmore.\n Features: This part is compatible with models including; FFHT1814QB2,FFHT1814QB1,FFHT1814QB0,NFTR18X4LW1,FFHT1826LWA,NFTR18X4LW0,NFTR18X4QB4A,FFHT1814QB3,NFTR18X4LW2,FFHT1826LW4,FFHT1826LW5,FFHT1826LW2,FFHT1826LW3,FFHT1826LW8,FFHT1826LW9,FFHT1826LW6,FFHT1826LW7,LFHT1817LW7,LFHT1817LW6,LFHT1817LW9,LFHT1817LW8,FFHT1816LS7,FFHT1826LW0,NFTR18X4LWA"}, {"role": "assistant", "content": "49.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: W10247710 Washer Suspension Rod Kit for Whirlpool Kenmore Maytag - Replaces PS2355518\n Description: Parts Number: W10247710, Replaces: PS2355518, W10237427, W10256514, W10277357, AP4411122\n Features: Parts Number: W10247710, Replaces: PS2355518, W10237427, W10256514, W10277357 Product Description: Washer Suspension (27 inch long) Rod Kit SAVE TIME AND MONEY - Inexpensive way to fix or repair a washer PREMIUM QUALITY - The replacement part is made from durable high quality material and well-tested by the manufacturer GUARANTEE: Discount Parts Direct is a US based company, from molding, stamping to assembly, inspection of each process has strict quality requirements and hand check. We offer customer 100% Money Back Guarantee. We appreciate your business.\n "}, {"role": "assistant", "content": "39.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 2-Pack Replacement for MSD2651HEB Refrigerator Water Filter - Compatible with Maytag UKF8001 Fridge Water Filter Cartridge\n Description: This is a Denali Pure Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any OEM brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by Denali Pure.\n Features: Replacement for UKF8001 Filter\n "}, {"role": "assistant", "content": "21.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: HQRP 2-Pack Wick Filter Compatible with Vornado EVAP1, EVAP2, EVAP3, Model 30 /Model 40 / Model 50 Humidifier\n Description: HQRP 2-pack Humidifier Wick Filter Replacement. Compatible with Vornado MD1-0002 / MD1-0001 Filter Replacement and All Vornado Humidifiers EVAP1, EVAP2, EVAP3, Model 30, Model 40, Model 50. For replacing the filter turn off and unplug the humidifier, remove the water tank, remove and discard used filter. Install the new filter. Make sure the filter fits flush against the bottom of the unit and snugs adainst the inlet grill. On the EVAP2 you may need to slightly bend the filter to match the curve of the unit. Replace the water tank.\n Features: HQRP\u00ae 2-pack Humidifier Wick Filter Replacement; Compatible with Vornado MD1-0002 / MD1-0001 Filter Replacement and All Vornado Evaporative Humidifiers; Absorbs hard water minerals and reduces scale build-up inside the humidifier; Replace at recommended intervals for best performance; 2 weeks DOA replacement warranty!\n "}, {"role": "assistant", "content": "11.91"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: ForeverPRO W10838313 Shelf-Wire for Whirlpool Appliance W10581579 W10837264\n Description: ForeverPRO Appliance Shelf-Wire Part Number W10838313 replaces W10581579 W10837264Fits Whirlpool Appliance. Compatible with Whirlpool Maytag KitchenAid Jenn-Air Amana Magic Chef Admiral Norge Roper and others This is not a Whirlpool OEM product. Use of the Manufacturers trade names and logos are the registered trademarks of their respective owners. Any use of the Manufacturers brand name, part numbers or model designation for this product is made solely for purposes of demonstrating and for identification compatibility and are displayed for descriptive purposes only. Use of them does not associated with, imply any affiliation or endorsement by any manufacturer.Compatible with GAFZ30FDGB00 GAFZ30FDGB01 WZF34X16DW00 WZF34X16DW02 WZF34X16DW04 WZF34X18DW00 WZF34X18DW01 WZF34X18DW02 WZF34X18DW03\n Features: \u2705 Easy to Install - Made Exactly to Fit For Most Top Brand Appliances \u2705 No Questions Asked Money Back Guarantee. Proud USA Based Company. Comes with 1 Year Warranty or 90 Day Returns \u2705 PRO Grade Premium Shelf-Wire - Meets or Exceeds OEM Specifications Quality. Comes Brand New in Original Retail Packaging \u2705 ForeverPRO Appliance Shelf-Wire Part Number W108"}, {"role": "assistant", "content": "80.87"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: NORLAKE 037453 Gasket Left Hand Door 26x78\n Description: Product Description 037453, GASKET LEFT HAND DOOR 26X78. Norlake Genuine OEM replacement part. Norlake has become a leader in high-quality refrigeration for the commercial foodservice operating. Use genuine OEM parts for safety reliability and performance. From the Manufacturer 037453, GASKET LEFT HAND DOOR 26X78. Norlake Genuine OEM replacement part. Norlake has become a leader in high-quality refrigeration for the commercial foodservice operating. Use genuine OEM parts for safety reliability and performance.\n Features: Genuine Oem Replacement Part Norlake Has Become A Leader In High-Quality Refrigeration For The Commercial Foodservice Operating Use Genuine Oem Parts For Safety Reliability And Performance From The Brand Name: Norlake\n "}, {"role": "assistant", "content": "71.74"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: UpStart Components Replacement for General Electric JBP72SK2SS Bake Element - Compatible with General Electric WB44T10011 Oven Heating Element\n Description: Please note: This is an UpStart Components brand replacement part, not an OEM product. This product is not affiliated with any OEM brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by Upstart Components. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners.\n Features: Replacement General Electric JBP72SK2SS Oven Bake Element Replaces General Electric WB44T10011 Oven Heating Element Quick and easy installation. Restore your old range and make it perform like brand new with this replacement heating element. Replace your heating element if you experience: little or no heat, slow to heat up, uneven heat, inaccurate temperature.\n "}, {"role": "assistant", "content": "28.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 2-Pack W10321304 Refrigerator Door Bin Replacement for Kenmore/Sears 106.54546400 Refrigerator - Compatible with WPW10321304 Door Bin\n Description: 2-Pack UpStart Components Replacement W10321304 Refrigerator Door Bin for Kenmore / Sears 106.54546400 RefrigeratorPlease note: This is an UpStart Components Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by UpStart Components.\n Features: UpStart Components Replacement W10321304 Refrigerator Door Bin for Kenmore / Sears 106.54546400 Refrigerator. Quantity: 2 Ultra durable, high quality material resists wear and tear over time. Easy at-home installation. An affordable way to extend the life of your machine. Please make sure to check your original part to confirm that you are buying the correct product. Compatible WPW10321304 Door Bin for Part Number WPW10321304, AP6019471, W10321304, 2171046, 2171047, 2179574, 2179575, 2179607, 2179607K, 2198449, "}, {"role": "assistant", "content": "36.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: LAMBRO INDUSTRIES 301 3\" Aluminum Flexible Duct\n Description: 301 3\" Aluminum Flexible Duct. The duct is totally non-combustible with a maximum operating temperature of 400 Degrees Fahrenheit.\n Features: Item Weight: 0.35 lb Country of Origin: United States Brand name: Lambro Item Dimensions: 23.2\"L x 3.4\"W x 3.4\"H\n "}, {"role": "assistant", "content": "11.35"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: [Upgraded] WB29K10023 Range Medium Burner Cap Replacement Part, Fit for GE Gas Range/Stove/Oven/Cooktop, 3.2 Inch Diameter (1Pcs)\n Description: This Gas Range Surface Burner Cap WB29K10023 for GE Gas Ranges/Stoves/Ovens is a cover for the medium sized burner head and is 3.2\" in diameter and black in color. The burner cap protects the burner head from spills and helps spread out the burner flame for even heating. If your burner caps for gas stove is old or worn, buying KOZHOM WB29K10023 Burner Cap is a good choice. Replaces Part Numbers: WB29K10023, AP3793089, 1086622, AH954202, EA954202, PS954202, GHPWB29K10023, etc. Compatible with various GE (General Electric) Gas Range/Stove/Oven/Cooktop, Models (Begin with AGB, C2S, CGB, CGP, CGS, EGR, J2B, JGA, JGB, JGP, JGS, P2B, P2S, PGB): AGBS45DEF1BS, AGBS45DEF1WS, AGBS45DEF2BS, AGBS45DEF2WS, C2S900P3M1D"}, {"role": "assistant", "content": "13.94"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: DC97-16742A Dryer Lint Filter Replacement for Samsung DV48J7700EW/A2 (0000) - Compatible with DC97-16742A Lint Screen Trap Catcher\n Description: UpStart Components Replacement DC97-16742A Dryer Lint Filter for Samsung DV48J7700EW/A2 (0000)Please note: This is an UpStart Components Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by UpStart Components.\n Features: UpStart Components Replacement DC97-16742A Dryer Lint Filter for Samsung DV48J7700EW/A2 (0000) Ultra durable, high quality material resists wear and tear over time. Easy at-home installation. An affordable way to extend the life of your machine. Please make sure to check your original part to confirm that you are buying the correct product. Compatible DC97-16742A Lint Screen Trap Catcher for Part Number DC97-16742A, AP5306681, PS4221839\n "}, {"role": "assistant", "content": "10.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Edgewater Parts WB30T10136, AP4363599, PS2339867 8\" Haliant Surface Element for Ranges and Cooktops, Compatible with GE, Replaces 1474221 (Fits Models: ABS, JB6, JCP, JP3, PCP)\n Description: The haliant surface element supplies the heat needed to the top of the cooktop. If your burner is not lighting up when it is turned on, you may have an issue with the haliant surface element. Be sure to disconnect power to the range before you begin this repair.\n Features: Edgewater Parts WB30T10136, AP4363599, PS2339867 8\" Haliant Surface Element for Ranges and Cooktops, Compatible with GE, Replaces 1474221 AP4363599, 474221, AH2339867, EA2339867, PS2339867, This product is covered under a 1 Year Warranty\n "}, {"role": "assistant", "content": "69.5"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 3-Pack Replacement for Whirlpool GI7FVCXWA01 Refrigerator Water Filter - Compatible with Whirlpool 4396395 Fridge Water Filter Cartridge\n Description: This is a Denali Pure Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any OEM brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by Denali Pure.\n Features: Replacement for UKF8001 Filter\n "}, {"role": "assistant", "content": "28.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: HNYWELL WICK FILTR HW500\n Description: Extended Life Wick Filter, Fits Honeywell HCM1000, HCM2000, KAZ3020, Vicks V3500, Robitussin DH835, HAC504.\n Features: RPS #HW500 Extention Life Wick Filter RPS PRODUCTS INC\n "}, {"role": "assistant", "content": "11.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Repairwares Clothes Dryer Belt W10198086 WPW10198086 AP4369191 PS11750135 for Select Whirlpool and Maytag Models\n Description: A clothes dryer belt transfers power from the motor to the tumbler drum. When this part fails or begins to fail, the dryer may become noisy, fail to tumble, or fail to start. Product is universal and may differ from original. Always take appropriate safety precautions when performing troubleshooting or repairs.\n Features: \u272b Model Number W10198086 WPW10198086 AP4369191 PS11750135 clothes dryer belt for many dryer and washer/dryer combo models from top brands such as Whirlpool, Maytag, and others \u272b Model Number W10198086 WPW10198086 AP4369191 PS11750135 clothes dryer belt for many dryer and washer/dryer combo models from top brands such as Whirlpool, Maytag, and others \u272b May be needed to address issues with dryer being noisy, failing to tumble, or failing to start \u272b Extends the service life of your dryer\n "}, {"role": "assistant", "content": "14.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Stove Counter Gap Cover - Flexible Easy Clean Heat Resistant Wide & Long Range Gap Filler, Seals Spills Between Appliances, Furniture, Stovetop, Oven, Washer & Dryer, Set of 2 (White, 25 Inches)\n Description: What is our stove counter gap seal strip? \u2605 Our stove gap seal or stove gap cap is a T-shaped strip of silicone made to cover the gap between your stove and countertop, also for oven, appliances, furniture and desktop, etc. It can prevent gunk, crumbs, and liquid from falling into that hard-to-clean abyss. It also seals the gap between even and uneven surfaces. \u2605 These are easy to install and easy to clean. Easily clean the spills with a damp cloth. \u2605 Having our gap seal strips will ensure that your kitchen stays cleaner. You can save your cleaning time! \u2605 Avoid food crumbs and spills go down the gap. No more hassle to move the stove forward and clean the mess on the sides. \u2605 Our stovetop gap covers can be safely used in dishwashers. They are flexible, durable, reusable and can be easily removed and tossed in the dishwasher. Premium quality heat resistant silicone withstands heat dry cycles in the dishwasher without any degradation. \u2605 The Stove Counter Gap Covers can be also cleaned with a damp cloth or handwashed in the sink. Package: One pair (2 units ) 25'' White Silicone Stove Counter Gap Covers with"}, {"role": "assistant", "content": "11.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Frigidaire 218976901 Frigidare Refrigerator Water Line, Green\n Description: This is a Genuine Replacement Part,The Model Number and Name for The Following Item: Frigidaire (FRIGB) 218976901 Water Line\n Features: Frigidaire (FRIGB) This is a genuine replacement part. refrigerator-replacement-parts Country of Origin: United States\n "}, {"role": "assistant", "content": "45.89"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Universal 3/4 in. x 6 ft. Stainless Steel High Efficiency Washing Machine Hose (2-Pack)\n Description: The Fluidmaster High Efficiency Washing Machine Hose includes two 72 in. stainless steel supply lines for your washing machine. The Fluidmaster High Efficiency hose has a larger inner diameter (ID) than standard WM hoses which allows for roughly a 50% greater flow rate (water comes out faster) than standard hoses. The greater flow rate helps optimize energy savings on both High Efficiency Washing Machines as well as traditional Washing Machines by filling the drum faster. In many cases newer High Efficiency Washing Machines will not operate as well as they should due to a restricted flow rate, the Fluidmaster High Efficiency Washing Machine Hose solves that problem.\n Features: Improves washing machine performance and saves energy Universal for both high efficiency and traditional washing machines Stainless steel supply line for added durability Large 1/2 in. ID hose for great flow rate\n "}, {"role": "assistant", "content": "18.75"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Star GE-Z9359 500 Ohm with Qc TRM Speed Cntl\n Description: Product Description GE-Z9359, SPEED CONTROL, 500 OHM WITH QC TRM. Star Genuine OEM replacement part. Since 1921, the Star Manufacturing Company has been making reliable, innovative commercial machines for cooking, serving and preparing food. Use genuine OEM parts for safety reliability and performance. From the Manufacturer GE-Z9359, SPEED CONTROL, 500 OHM WITH QC TRM. Star Genuine OEM replacement part. Since 1921, the Star Manufacturing Company has been making reliable, innovative commercial machines for cooking, serving and preparing food. Use genuine OEM parts for safety reliability and performance.\n Features: Made in United States Package length : 4.0\" Package width : 4.0\" Package height : 6.0\"\n "}, {"role": "assistant", "content": "15.77"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Supco 8 Cube Ice Maker Replacement Kit for Whirlpool, Kenmore, KitchenAid, Part No. RIM597\n Description: Product Description Replacement Ice Maker Unit This modular style ice maker is a direct replacement for thousands of Kenmore, Whirlpool, and KitchenAid in the door ice makers. This high quality ice maker, Model No. RIM597, is designed to meet or exceed OEM specifications and has wide application across many refrigerator models. Product Features Part No. RIM597; Replaces 626663, 2198678, 2198597, and more Part No. RIM597; Replaces 626663, 2198678, 2198597, and more Meets or Exceeds OEM Specifications Meets or Exceeds OEM Specifications Compatible with Kenmore, Whirlpool, KitchenAid brands Compatible with Kenmore, Whirlpool, KitchenAid brands About Supco Founded in 1945 in the Bronx, NY by two naval engineers, Sealed Unit Parts Co.,Inc (SUPCO) originated as a service company for refrigeration systems. We bring continued product line expansion through in-house development, master distributor relationships, and acquisition. This strengthens our position as a leader in the HVAC, Refrigeration and Appliance industries. From the Manufacturer Installs using existing wiring and plumbing.\n Features: MODULAR ICE MAKER - This Supco modular ice maker unit is an excellent replacement for in the door ice makers including units"}, {"role": "assistant", "content": "51.23"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Samsung DD82-01118A Dishwasher Sensor\n Description: This is an authorized aftermarket product. Fits with various Samsung brand models. It has a oem part # DD82-01118A.\n Features: This is an O.E.M. Authorized part Fits with various Samsung brand models OEM part # DD82-01118A Package dimensions: 1.0\" L x 1.0\" W x 1.0\" H\n "}, {"role": "assistant", "content": "71.95"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: ANETS P8903-22, Thermopile With Nut Anets Replacement Part\n Description: Product Description P8903-22, T-PILE, MILLIVOLT 36IN. Anets Genuine OEM replacement part. Anets stands behind their line of high quality fryers, griddles and other kitchen equipment. Use genuine OEM parts for safety reliability and performance. From the Manufacturer P8903-22, T-PILE, MILLIVOLT 36IN. Anets Genuine OEM replacement part. Anets stands behind their line of high quality fryers, griddles and other kitchen equipment. Use genuine OEM parts for safety reliability and performance.\n Features: Genuine OEM replacement part Anets stands behind their line of high quality fryers, griddles and other kitchen equipment Use genuine OEM parts for safety reliability and performance Package dimensions: 4.0\" L x 4.0\" W x 6.0\" H\n "}, {"role": "assistant", "content": "25.0"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: 3-Pack Replacement for Sears/Kenmore 10654619300 Refrigerator Water Filter - Compatible with Sears/Kenmore 46-9010, 46-9902, 46-9908 Fridge Water Filter Cartridge\n Description: This is a Denali Pure Brand replacement part, NOT an OEM product. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners. This product is not affiliated with any OEM brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by Denali Pure.\n Features: Replacement for 4396508 Filter\n "}, {"role": "assistant", "content": "29.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: TRUE PARTS 908759 SHELF GDM-26 IDL WHT WIRE (908759)\n Description: Shelf for True GDM26\n Features: SHELF FOR GDM26 COMES WITH CLIPS WHITE\n "}, {"role": "assistant", "content": "75.0"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: GE Cafe Range Burner Control Knob Replacement Part WB03X25889 for CGP350 & CGP350 Series, Replace WB03T10329, WB03X25889, 4920893, GEHWB03X25889, WB03X32194\n Description: The 74010839 Surface Burner Knob is a direct replacement for the cooktops on your Kitchen. It lets you control the heat of the surface burner on the cooktop. No tools are required to complete this repair, simply pull on the knob until it pops off, and fit the new knob onto the shaft. NOTE: The length of the stem is approximately 1/2 inch. If your stem is 7/8\" inch, then you need W10818230 instead and this knob won't fit. If your knob has \"Off\", \"Ignite\", etc. you will need W10766544 instead. Fixes the following symptoms: * Cooktop will not set * Will not turn * Will not stay on Replaces the following parts : WB03X25889, AP5985157, WB03T10329, WB03T10320, LP16392, WB03X32194, 4920893, AP6837585, PS12709871, EAP12709871, etc. Compatible models include but are not limited to: CGP350SET1SS, CGP"}, {"role": "assistant", "content": "11.98"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Washer Door Handle (Light Grey) Duet for Whirlpool GHW9100LW2 GHW9200LW GHW9300PW4\n Description: Washer Door Handle (Light Grey) Duet for Whirlpool GHW9100LW2 GHW9200LW GHW9300PW4 Fits front load Whirlpool/Kenmore made washers. Whirlpool Duet and some Kenmore models with a dimension 4.90\" x 2.57\" x 1.15 Color: Light Grey\n Features: Washer Door Handle (Light Grey) Duet for Whirlpool GHW9100LW2 GHW9200LW GHW9300PW4\n "}, {"role": "assistant", "content": "11.0"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: UpStart Components 2 Pack Replacement Control Knob Assembly WB03K10265 Stainless Steel for General Electric CGS980SEM6SS Range\n Description: 2 Pack Replacement Control Knob Assembly WB03K10265 Stainless Steel for General Electric CGS980SEM6SS Range Please note: This is an UpStart Components Brand replacement part, NOT an OEM product. This product is not affiliated with any OEM brands and is not covered under any warranties offered by the original manufacturers. Any warranties for this product are offered solely by UpStart Components. All mentions of brand names or model descriptions are made strictly to illustrate compatibility. All brand names and logos are registered trademarks of their respective owners.\n Features: Replacement part for 1473247, AP4363671, WB03K10242, WB03K10265 Replacement knob engineered to fit name brand appliances. Design features high-quality materials for superior durability and extended life. Simple installation lets you get back to your job in a flash. A cost-efficient solution to extend the life of your appliances in just a few easy steps. UpStart Components Brand. One Year Warranty\n "}, {"role": "assistant", "content": "19.99"}]}
|
||||||
|
{"messages": [{"role": "system", "content": "\nYou are a price prediction expert. Given a product's title, description, features, or details, predict its price in USD.\n\nRules:\n1. Analyze all available product information carefully\n2. If information is incomplete or truncated, use your knowledge of similar products and market pricing to make informed predictions\n3. Consider product quality indicators, brand reputation, features, and typical market values\n4. Return ONLY the numeric price (e.g., \"29.99\") \n5. Do not include currency symbols, explanations, or additional text\n"}, {"role": "user", "content": "\n Below are the details of the product: \n Title: Yinkin 4 Pcs Door Knob Covers Floral Door Knob Protector Soft Baby Door Knob Safety Cover with Cotton and Sponge, Reusable and Washable, Decorate Your Round Door Handle (Black, White)\n Description: Features: Thoughtful gifts: The door knob protector cover is an ideal gift choice for family and buddies who like to spruce up small home corners with little things and do not like the banging of doorknobs. Widely applied: The safety covers for door knobs can nicely decorate the little details in life, suitable for door knobs of houses, hotels, offices, children's rooms, shops, clubs, classrooms and more. Specifications: Material: cotton, sponge Color: black and white Size: 8 cm/ 3 inches in diameter Package includes: 4 x Door knob covers Notes: Manual measurement, please allow slight errors on size. The color may exist a slight difference due to different screen displays.\n Features: Pack of 4: there are a total of 4 pieces of baby proof door knob covers in the package, featuring a beautiful and elegant floral design, which will be a magnet for you when opening the package, rich numbers to meet your diverse needs for daily use and replacements; Nice Handcraft: the floral safety knob covers are composed of cotton and sponge, and the interior is filled with a 10 mm thick high density foam pad, which is"}, {"role": "assistant", "content": "11.49"}]}
|
||||||
457
week7/community_contributions/Exercise_Week_7_jom.ipynb
Normal file
457
week7/community_contributions/Exercise_Week_7_jom.ipynb
Normal file
@@ -0,0 +1,457 @@
|
|||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "cbf08d83",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# Training"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "f22db0ae",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"!pip install unsloth"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "e5e1ac78",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import unsloth\n",
|
||||||
|
"\n",
|
||||||
|
"import os\n",
|
||||||
|
"import re\n",
|
||||||
|
"import math\n",
|
||||||
|
"from tqdm import tqdm\n",
|
||||||
|
"from google.colab import userdata\n",
|
||||||
|
"from huggingface_hub import login\n",
|
||||||
|
"# import torch\n",
|
||||||
|
"# import transformers\n",
|
||||||
|
"# from transformers import AutoModelForCausalLM, AutoTokenizer, TrainingArguments, set_seed, BitsAndBytesConfig\n",
|
||||||
|
"from datasets import load_dataset, Dataset, DatasetDict\n",
|
||||||
|
"import wandb\n",
|
||||||
|
"#from peft import LoraConfig\n",
|
||||||
|
"#from trl import SFTTrainer, SFTConfig\n",
|
||||||
|
"from datetime import datetime\n",
|
||||||
|
"import matplotlib.pyplot as plt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "75bee643",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Constants\n",
|
||||||
|
"BASE_MODEL = \"unsloth/phi-4-unsloth-bnb-4bit\"\n",
|
||||||
|
"\n",
|
||||||
|
"PROJECT_NAME = \"pricer\"\n",
|
||||||
|
"HF_USER = \"javiomotero\" # your HF name here!\n",
|
||||||
|
"\n",
|
||||||
|
"DATASET_NAME = f\"{HF_USER}/lite-data\"\n",
|
||||||
|
"\n",
|
||||||
|
"dataset = load_dataset(DATASET_NAME)\n",
|
||||||
|
"train = dataset['train']\n",
|
||||||
|
"test = dataset['test']\n",
|
||||||
|
"\n",
|
||||||
|
"# Split your dataset into train and eval\n",
|
||||||
|
"split_dataset = train.train_test_split(test_size=0.1, seed=42)\n",
|
||||||
|
"\n",
|
||||||
|
"train_dataset = split_dataset[\"train\"]\n",
|
||||||
|
"eval_dataset = split_dataset[\"test\"]\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"RUN_NAME = f\"{datetime.now():%Y-%m-%d_%H.%M.%S}\"\n",
|
||||||
|
"PROJECT_RUN_NAME = f\"{PROJECT_NAME}-{RUN_NAME}\"\n",
|
||||||
|
"HUB_MODEL_NAME = f\"{HF_USER}/{PROJECT_RUN_NAME}\"\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"LOGGING_STEPS = 50\n",
|
||||||
|
"SAVE_STEPS = 500\n",
|
||||||
|
"LOG_TO_WANDB = True\n",
|
||||||
|
"\n",
|
||||||
|
"# Log in to HuggingFace\n",
|
||||||
|
"\n",
|
||||||
|
"hf_token = userdata.get('HF_TOKEN')\n",
|
||||||
|
"login(hf_token, add_to_git_credential=True)\n",
|
||||||
|
"\n",
|
||||||
|
"# Log in to Weights & Biases\n",
|
||||||
|
"wandb_api_key = userdata.get('WANDB_API_KEY')\n",
|
||||||
|
"os.environ[\"WANDB_API_KEY\"] = wandb_api_key\n",
|
||||||
|
"wandb.login()\n",
|
||||||
|
"\n",
|
||||||
|
"# Configure Weights & Biases to record against our project\n",
|
||||||
|
"os.environ[\"WANDB_PROJECT\"] = PROJECT_NAME\n",
|
||||||
|
"os.environ[\"WANDB_LOG_MODEL\"] = \"checkpoint\" if LOG_TO_WANDB else \"end\"\n",
|
||||||
|
"os.environ[\"WANDB_WATCH\"] = \"gradients\"\n",
|
||||||
|
"\n",
|
||||||
|
"if LOG_TO_WANDB:\n",
|
||||||
|
" run = wandb.init(project=PROJECT_NAME, name=RUN_NAME)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "260975b0",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"from unsloth import FastLanguageModel, is_bfloat16_supported\n",
|
||||||
|
"from trl import SFTTrainer, SFTConfig\n",
|
||||||
|
"from peft import LoraConfig\n",
|
||||||
|
"import torch\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"# Your hyperparameters\n",
|
||||||
|
"LORA_R = 8\n",
|
||||||
|
"LORA_ALPHA = 2 * LORA_R\n",
|
||||||
|
"LORA_DROPOUT = 0.2\n",
|
||||||
|
"TARGET_MODULES = [\"q_proj\", \"v_proj\", \"k_proj\", \"o_proj\"] # keep small for T4\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"EPOCHS = 1\n",
|
||||||
|
"BATCH_SIZE = 1\n",
|
||||||
|
"GRADIENT_ACCUMULATION_STEPS = 1\n",
|
||||||
|
"LEARNING_RATE = 1e-4\n",
|
||||||
|
"LR_SCHEDULER_TYPE = \"cosine\"\n",
|
||||||
|
"WARMUP_RATIO = 0.03\n",
|
||||||
|
"OPTIMIZER = \"paged_adamw_32bit\" # consider adamw_8bit if you hit NaNs or OOM\n",
|
||||||
|
"MAX_SEQUENCE_LENGTH = 182\n",
|
||||||
|
"\n",
|
||||||
|
"# 1) Load model via Unsloth in 4-bit\n",
|
||||||
|
"dtype = \"bfloat16\" if is_bfloat16_supported() else \"float16\"\n",
|
||||||
|
"model, tokenizer = FastLanguageModel.from_pretrained(\n",
|
||||||
|
" model_name = BASE_MODEL,\n",
|
||||||
|
" max_seq_length = MAX_SEQUENCE_LENGTH,\n",
|
||||||
|
" load_in_4bit = True,\n",
|
||||||
|
" dtype = dtype,\n",
|
||||||
|
")\n",
|
||||||
|
"\n",
|
||||||
|
"tokenizer.pad_token = tokenizer.eos_token\n",
|
||||||
|
"tokenizer.padding_side = \"right\"\n",
|
||||||
|
"\n",
|
||||||
|
"# 2) Apply LoRA using Unsloth helper (uses gradient checkpointing under the hood if set)\n",
|
||||||
|
"peft_config = LoraConfig(\n",
|
||||||
|
" r = LORA_R,\n",
|
||||||
|
" lora_alpha = LORA_ALPHA,\n",
|
||||||
|
" lora_dropout = LORA_DROPOUT,\n",
|
||||||
|
" bias = \"none\",\n",
|
||||||
|
" task_type = \"CAUSAL_LM\",\n",
|
||||||
|
" target_modules = TARGET_MODULES,\n",
|
||||||
|
")\n",
|
||||||
|
"\n",
|
||||||
|
"model = FastLanguageModel.get_peft_model(\n",
|
||||||
|
" model,\n",
|
||||||
|
" r = peft_config.r,\n",
|
||||||
|
" lora_alpha = peft_config.lora_alpha,\n",
|
||||||
|
" lora_dropout = peft_config.lora_dropout,\n",
|
||||||
|
" target_modules = peft_config.target_modules,\n",
|
||||||
|
" bias = peft_config.bias,\n",
|
||||||
|
" use_gradient_checkpointing = \"unsloth\",\n",
|
||||||
|
")\n",
|
||||||
|
"\n",
|
||||||
|
"# 3) Your SFTConfig (same API, Unsloth integrates with TRL’s SFTTrainer)\n",
|
||||||
|
"train_parameters = SFTConfig(\n",
|
||||||
|
" output_dir = PROJECT_RUN_NAME,\n",
|
||||||
|
" num_train_epochs = EPOCHS,\n",
|
||||||
|
" per_device_train_batch_size = BATCH_SIZE,\n",
|
||||||
|
" per_device_eval_batch_size = 1,\n",
|
||||||
|
" eval_strategy = \"steps\",\n",
|
||||||
|
" eval_steps = SAVE_STEPS,\n",
|
||||||
|
" gradient_accumulation_steps = GRADIENT_ACCUMULATION_STEPS,\n",
|
||||||
|
" optim = OPTIMIZER,\n",
|
||||||
|
" save_steps = SAVE_STEPS,\n",
|
||||||
|
" save_total_limit = 10,\n",
|
||||||
|
" logging_steps = LOGGING_STEPS,\n",
|
||||||
|
" learning_rate = LEARNING_RATE,\n",
|
||||||
|
" weight_decay = 0.001,\n",
|
||||||
|
" fp16 = (dtype == \"float16\"),\n",
|
||||||
|
" bf16 = (dtype == \"bfloat16\"),\n",
|
||||||
|
" max_grad_norm = 0.3,\n",
|
||||||
|
" max_steps = -1,\n",
|
||||||
|
" warmup_ratio = WARMUP_RATIO,\n",
|
||||||
|
" group_by_length = True,\n",
|
||||||
|
" lr_scheduler_type = LR_SCHEDULER_TYPE,\n",
|
||||||
|
" report_to = \"wandb\" if LOG_TO_WANDB else None,\n",
|
||||||
|
" run_name = RUN_NAME,\n",
|
||||||
|
" max_seq_length = MAX_SEQUENCE_LENGTH,\n",
|
||||||
|
" dataset_text_field = \"text\",\n",
|
||||||
|
" save_strategy = \"steps\",\n",
|
||||||
|
" hub_strategy = \"every_save\",\n",
|
||||||
|
" push_to_hub = True,\n",
|
||||||
|
" hub_model_id = HUB_MODEL_NAME,\n",
|
||||||
|
" hub_private_repo = True,\n",
|
||||||
|
")\n",
|
||||||
|
"\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "f1b324fb",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"\n",
|
||||||
|
"#Checkpointing from wandb (run) - I guess we can also do from HF\n",
|
||||||
|
"#checkpoint_url = \"javier-otero-marquez-personal-education/pricer/model-2025-10-25_15.39.13:v3\" #This was for first retrain\n",
|
||||||
|
"checkpoint_url = \"javier-otero-marquez-personal-education/pricer/model-2025-10-26_09.54.35:v1\"\n",
|
||||||
|
"\n",
|
||||||
|
"artifact = run.use_artifact(checkpoint_url, type='model')\n",
|
||||||
|
"artifact_dir = artifact.download()\n",
|
||||||
|
"\n",
|
||||||
|
"trainer = SFTTrainer(\n",
|
||||||
|
" model = model,\n",
|
||||||
|
" tokenizer = tokenizer,\n",
|
||||||
|
" args = train_parameters,\n",
|
||||||
|
" train_dataset = train_dataset,\n",
|
||||||
|
" eval_dataset = eval_dataset,\n",
|
||||||
|
" packing = False, # safer for stability; can turn on after it fits\n",
|
||||||
|
" completion_only_loss=True\n",
|
||||||
|
")\n",
|
||||||
|
"trainer.train(resume_from_checkpoint=artifact_dir)\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "affe0724",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# Inference"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "b855e0a6",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# imports\n",
|
||||||
|
"\n",
|
||||||
|
"import os\n",
|
||||||
|
"import re\n",
|
||||||
|
"import math\n",
|
||||||
|
"from tqdm import tqdm\n",
|
||||||
|
"from google.colab import userdata\n",
|
||||||
|
"from huggingface_hub import login\n",
|
||||||
|
"import torch\n",
|
||||||
|
"import torch.nn.functional as F\n",
|
||||||
|
"import transformers\n",
|
||||||
|
"from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, set_seed\n",
|
||||||
|
"from datasets import load_dataset, Dataset, DatasetDict\n",
|
||||||
|
"from datetime import datetime\n",
|
||||||
|
"from peft import PeftModel\n",
|
||||||
|
"import matplotlib.pyplot as plt\n",
|
||||||
|
"# Constants\n",
|
||||||
|
"\n",
|
||||||
|
"BASE_MODEL = \"unsloth/phi-4-unsloth-bnb-4bit\"\n",
|
||||||
|
"PROJECT_NAME = \"pricer\"\n",
|
||||||
|
"HF_USER = \"javiomotero\" # your HF name here! Or use mine if you just want to reproduce my results.\n",
|
||||||
|
"\n",
|
||||||
|
"# The run itselfjaviomotero/pricer-\n",
|
||||||
|
"RUN_NAME = \"2025-10-26_09.54.35\"\n",
|
||||||
|
"PROJECT_RUN_NAME = f\"{PROJECT_NAME}-{RUN_NAME}\"\n",
|
||||||
|
"REVISION = \"53c8d992140e5b184e9388418d711d3e38f7bd9d\" # or REVISION = None\n",
|
||||||
|
"FINETUNED_MODEL = f\"{HF_USER}/{PROJECT_RUN_NAME}\"\n",
|
||||||
|
"\n",
|
||||||
|
"# Uncomment this line if you wish to use my model\n",
|
||||||
|
"# FINETUNED_MODEL = f\"ed-donner/{PROJECT_RUN_NAME}\"\n",
|
||||||
|
"\n",
|
||||||
|
"# Data\n",
|
||||||
|
"\n",
|
||||||
|
"DATASET_NAME = f\"{HF_USER}/lite-data\"\n",
|
||||||
|
"# Or just use the one I've uploaded\n",
|
||||||
|
"# DATASET_NAME = \"ed-donner/pricer-data\"\n",
|
||||||
|
"\n",
|
||||||
|
"# Hyperparameters for QLoRA\n",
|
||||||
|
"\n",
|
||||||
|
"QUANT_4_BIT = True\n",
|
||||||
|
"\n",
|
||||||
|
"%matplotlib inline\n",
|
||||||
|
"\n",
|
||||||
|
"# Used for writing to output in color\n",
|
||||||
|
"\n",
|
||||||
|
"GREEN = \"\\033[92m\"\n",
|
||||||
|
"YELLOW = \"\\033[93m\"\n",
|
||||||
|
"RED = \"\\033[91m\"\n",
|
||||||
|
"RESET = \"\\033[0m\"\n",
|
||||||
|
"COLOR_MAP = {\"red\":RED, \"orange\": YELLOW, \"green\": GREEN}\n",
|
||||||
|
"# Log in to HuggingFace\n",
|
||||||
|
"\n",
|
||||||
|
"hf_token = userdata.get('HF_TOKEN')\n",
|
||||||
|
"login(hf_token, add_to_git_credential=True)\n",
|
||||||
|
"dataset = load_dataset(DATASET_NAME)\n",
|
||||||
|
"train = dataset['train']\n",
|
||||||
|
"test = dataset['test']\n",
|
||||||
|
"# pick the right quantization (thank you Robert M. for spotting the bug with the 8 bit version!)\n",
|
||||||
|
"\n",
|
||||||
|
"if QUANT_4_BIT:\n",
|
||||||
|
" quant_config = BitsAndBytesConfig(\n",
|
||||||
|
" load_in_4bit=True,\n",
|
||||||
|
" bnb_4bit_use_double_quant=True,\n",
|
||||||
|
" bnb_4bit_compute_dtype=torch.bfloat16,\n",
|
||||||
|
" bnb_4bit_quant_type=\"nf4\"\n",
|
||||||
|
" )\n",
|
||||||
|
"else:\n",
|
||||||
|
" quant_config = BitsAndBytesConfig(\n",
|
||||||
|
" load_in_8bit=True,\n",
|
||||||
|
" bnb_8bit_compute_dtype=torch.bfloat16\n",
|
||||||
|
" )\n",
|
||||||
|
"# Load the Tokenizer and the Model\n",
|
||||||
|
"\n",
|
||||||
|
"tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL, trust_remote_code=True)\n",
|
||||||
|
"tokenizer.pad_token = tokenizer.eos_token\n",
|
||||||
|
"tokenizer.padding_side = \"right\"\n",
|
||||||
|
"\n",
|
||||||
|
"base_model = AutoModelForCausalLM.from_pretrained(\n",
|
||||||
|
" BASE_MODEL,\n",
|
||||||
|
" quantization_config=quant_config,\n",
|
||||||
|
" device_map=\"auto\",\n",
|
||||||
|
")\n",
|
||||||
|
"base_model.generation_config.pad_token_id = tokenizer.pad_token_id\n",
|
||||||
|
"\n",
|
||||||
|
"# Load the fine-tuned model with PEFT\n",
|
||||||
|
"if REVISION:\n",
|
||||||
|
" fine_tuned_model = PeftModel.from_pretrained(base_model, FINETUNED_MODEL, revision=REVISION)\n",
|
||||||
|
"else:\n",
|
||||||
|
" fine_tuned_model = PeftModel.from_pretrained(base_model, FINETUNED_MODEL)\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"print(f\"Memory footprint: {fine_tuned_model.get_memory_footprint() / 1e6:.1f} MB\")"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "d4e6e25c",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def extract_price(s):\n",
|
||||||
|
" if \"Price is $\" in s:\n",
|
||||||
|
" contents = s.split(\"Price is $\")[1]\n",
|
||||||
|
" contents = contents.replace(',','')\n",
|
||||||
|
" match = re.search(r\"[-+]?\\d*\\.\\d+|\\d+\", contents)\n",
|
||||||
|
" return float(match.group()) if match else 0\n",
|
||||||
|
" return 0\n",
|
||||||
|
"top_K = 3\n",
|
||||||
|
"\n",
|
||||||
|
"def improved_model_predict(prompt, device=\"cuda\"):\n",
|
||||||
|
" set_seed(42)\n",
|
||||||
|
" inputs = tokenizer.encode(prompt, return_tensors=\"pt\").to(device)\n",
|
||||||
|
" attention_mask = torch.ones(inputs.shape, device=device)\n",
|
||||||
|
"\n",
|
||||||
|
" with torch.no_grad():\n",
|
||||||
|
" outputs = fine_tuned_model(inputs, attention_mask=attention_mask)\n",
|
||||||
|
" next_token_logits = outputs.logits[:, -1, :].to('cpu')\n",
|
||||||
|
"\n",
|
||||||
|
" next_token_probs = F.softmax(next_token_logits, dim=-1)\n",
|
||||||
|
" top_prob, top_token_id = next_token_probs.topk(top_K)\n",
|
||||||
|
" prices, weights = [], []\n",
|
||||||
|
" for i in range(top_K):\n",
|
||||||
|
" predicted_token = tokenizer.decode(top_token_id[0][i])\n",
|
||||||
|
" probability = top_prob[0][i]\n",
|
||||||
|
" try:\n",
|
||||||
|
" result = float(predicted_token)\n",
|
||||||
|
" except ValueError as e:\n",
|
||||||
|
" result = 0.0\n",
|
||||||
|
" if result > 0:\n",
|
||||||
|
" prices.append(result)\n",
|
||||||
|
" weights.append(probability)\n",
|
||||||
|
" if not prices:\n",
|
||||||
|
" return 0.0, 0.0\n",
|
||||||
|
" total = sum(weights)\n",
|
||||||
|
" weighted_prices = [price * weight / total for price, weight in zip(prices, weights)]\n",
|
||||||
|
" return sum(weighted_prices).item()\n",
|
||||||
|
"\n",
|
||||||
|
"class Tester:\n",
|
||||||
|
"\n",
|
||||||
|
" def __init__(self, predictor, data, title=None, size=250):\n",
|
||||||
|
" self.predictor = predictor\n",
|
||||||
|
" self.data = data\n",
|
||||||
|
" self.title = title or predictor.__name__.replace(\"_\", \" \").title()\n",
|
||||||
|
" self.size = size\n",
|
||||||
|
" self.guesses = []\n",
|
||||||
|
" self.truths = []\n",
|
||||||
|
" self.errors = []\n",
|
||||||
|
" self.sles = []\n",
|
||||||
|
" self.colors = []\n",
|
||||||
|
"\n",
|
||||||
|
" def color_for(self, error, truth):\n",
|
||||||
|
" if error<40 or error/truth < 0.2:\n",
|
||||||
|
" return \"green\"\n",
|
||||||
|
" elif error<80 or error/truth < 0.4:\n",
|
||||||
|
" return \"orange\"\n",
|
||||||
|
" else:\n",
|
||||||
|
" return \"red\"\n",
|
||||||
|
"\n",
|
||||||
|
" def run_datapoint(self, i):\n",
|
||||||
|
" datapoint = self.data[i]\n",
|
||||||
|
" guess = self.predictor(datapoint[\"text\"])\n",
|
||||||
|
" truth = datapoint[\"price\"]\n",
|
||||||
|
" error = abs(guess - truth)\n",
|
||||||
|
" log_error = math.log(truth+1) - math.log(guess+1)\n",
|
||||||
|
" sle = log_error ** 2\n",
|
||||||
|
" color = self.color_for(error, truth)\n",
|
||||||
|
" title = datapoint[\"text\"].split(\"\\n\\n\")[1][:20] + \"...\"\n",
|
||||||
|
" self.guesses.append(guess)\n",
|
||||||
|
" self.truths.append(truth)\n",
|
||||||
|
" self.errors.append(error)\n",
|
||||||
|
" self.sles.append(sle)\n",
|
||||||
|
" self.colors.append(color)\n",
|
||||||
|
" print(f\"{COLOR_MAP[color]}{i+1}: Guess: ${guess:,.2f} Truth: ${truth:,.2f} Error: ${error:,.2f} SLE: {sle:,.2f} Item: {title}{RESET}\")\n",
|
||||||
|
"\n",
|
||||||
|
" def chart(self, title):\n",
|
||||||
|
" max_error = max(self.errors)\n",
|
||||||
|
" plt.figure(figsize=(12, 8))\n",
|
||||||
|
" max_val = max(max(self.truths), max(self.guesses))\n",
|
||||||
|
" plt.plot([0, max_val], [0, max_val], color='deepskyblue', lw=2, alpha=0.6)\n",
|
||||||
|
" plt.scatter(self.truths, self.guesses, s=3, c=self.colors)\n",
|
||||||
|
" plt.xlabel('Ground Truth')\n",
|
||||||
|
" plt.ylabel('Model Estimate')\n",
|
||||||
|
" plt.xlim(0, max_val)\n",
|
||||||
|
" plt.ylim(0, max_val)\n",
|
||||||
|
" plt.title(title)\n",
|
||||||
|
" plt.show()\n",
|
||||||
|
"\n",
|
||||||
|
" def report(self):\n",
|
||||||
|
" average_error = sum(self.errors) / self.size\n",
|
||||||
|
" rmsle = math.sqrt(sum(self.sles) / self.size)\n",
|
||||||
|
" hits = sum(1 for color in self.colors if color==\"green\")\n",
|
||||||
|
" title = f\"{self.title} Error=${average_error:,.2f} RMSLE={rmsle:,.2f} Hits={hits/self.size*100:.1f}%\"\n",
|
||||||
|
" self.chart(title)\n",
|
||||||
|
"\n",
|
||||||
|
" def run(self):\n",
|
||||||
|
" self.error = 0\n",
|
||||||
|
" for i in range(self.size):\n",
|
||||||
|
" self.run_datapoint(i)\n",
|
||||||
|
" self.report()\n",
|
||||||
|
"\n",
|
||||||
|
" @classmethod\n",
|
||||||
|
" def test(cls, function, data):\n",
|
||||||
|
" cls(function, data).run()\n",
|
||||||
|
"#Step 6000\n",
|
||||||
|
"Tester.test(improved_model_predict, test)"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"language_info": {
|
||||||
|
"name": "python"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 5
|
||||||
|
}
|
||||||
5
week7/community_contributions/kachaje-andela-genai-bootcamp/.gitignore
vendored
Normal file
5
week7/community_contributions/kachaje-andela-genai-bootcamp/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
items.py
|
||||||
|
loaders.py
|
||||||
|
testing.py
|
||||||
|
*.pkl
|
||||||
|
.tmp*
|
||||||
File diff suppressed because it is too large
Load Diff
430
week8/community_contributions/Exercise_Week_8_jom.ipynb
Normal file
430
week8/community_contributions/Exercise_Week_8_jom.ipynb
Normal file
@@ -0,0 +1,430 @@
|
|||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "fbcdfea8-7241-46d7-a771-c0381a3e7063",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# imports\n",
|
||||||
|
"\n",
|
||||||
|
"import os\n",
|
||||||
|
"import re\n",
|
||||||
|
"import math\n",
|
||||||
|
"import json\n",
|
||||||
|
"from tqdm import tqdm\n",
|
||||||
|
"import random\n",
|
||||||
|
"from dotenv import load_dotenv\n",
|
||||||
|
"from huggingface_hub import login\n",
|
||||||
|
"import numpy as np\n",
|
||||||
|
"import pickle\n",
|
||||||
|
"from openai import OpenAI\n",
|
||||||
|
"from sentence_transformers import SentenceTransformer\n",
|
||||||
|
"from datasets import load_dataset\n",
|
||||||
|
"import chromadb\n",
|
||||||
|
"from items import Item\n",
|
||||||
|
"from testing import Tester\n",
|
||||||
|
"import pandas as pd\n",
|
||||||
|
"import numpy as np\n",
|
||||||
|
"from sklearn.ensemble import RandomForestRegressor\n",
|
||||||
|
"from sklearn.linear_model import LinearRegression, ElasticNet\n",
|
||||||
|
"from sklearn.metrics import mean_squared_error, r2_score\n",
|
||||||
|
"import joblib\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "e6e88bd1-f89c-4b98-92fa-aa4bc1575bca",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# CONSTANTS\n",
|
||||||
|
"\n",
|
||||||
|
"QUESTION = \"How much does this cost to the nearest dollar?\\n\\n\"\n",
|
||||||
|
"DB = \"products_vectorstore\"\n",
|
||||||
|
"# environment\n",
|
||||||
|
"\n",
|
||||||
|
"load_dotenv(override=True)\n",
|
||||||
|
"os.environ['OPENAI_API_KEY'] = os.getenv('OPENAI_API_KEY', 'your-key-if-not-using-env')\n",
|
||||||
|
"os.environ['HF_TOKEN'] = os.getenv('HF_TOKEN', 'your-key-if-not-using-env')\n",
|
||||||
|
"\n",
|
||||||
|
"hf_token = os.environ['HF_TOKEN']\n",
|
||||||
|
"login(hf_token, add_to_git_credential=True)\n",
|
||||||
|
"\n",
|
||||||
|
"from items import Item\n",
|
||||||
|
"\n",
|
||||||
|
"with open('test.pkl', 'rb') as file:\n",
|
||||||
|
" test = pickle.load(file)\n",
|
||||||
|
"\n",
|
||||||
|
"client = chromadb.PersistentClient(path=DB)\n",
|
||||||
|
"collection = client.get_or_create_collection('products')\n",
|
||||||
|
"result = collection.get(include=['embeddings', 'documents', 'metadatas'])\n",
|
||||||
|
"vectors = np.array(result['embeddings'])\n",
|
||||||
|
"documents = result['documents']\n",
|
||||||
|
"prices = [metadata['price'] for metadata in result['metadatas']]\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "bf6492cb-b11a-4ad5-859b-a71a78ffb949",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# Catboost GBT\n",
|
||||||
|
"\n",
|
||||||
|
"We will now train a Random Forest model.\n",
|
||||||
|
"\n",
|
||||||
|
"Can you spot the difference from what we did in Week 6? In week 6 we used the word2vec model to form vectors; this time we'll use the vectors we already have in Chroma, from the SentenceTransformer model."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "6d25befe",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"from catboost import CatBoostRegressor\n",
|
||||||
|
"import numpy as np\n",
|
||||||
|
"\n",
|
||||||
|
"# Initialize the model\n",
|
||||||
|
"model = CatBoostRegressor(\n",
|
||||||
|
" iterations=1000,\n",
|
||||||
|
" learning_rate=0.03,\n",
|
||||||
|
" depth=6,\n",
|
||||||
|
" loss_function='RMSE',\n",
|
||||||
|
" verbose=100\n",
|
||||||
|
")\n",
|
||||||
|
"\n",
|
||||||
|
"model.fit(vectors, prices)\n",
|
||||||
|
"joblib.dump(model, 'random_forest_model.pkl')"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "a78e1e02",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"Tester.test(model, test)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "5d438dec-8e5b-4e60-bb6f-c3f82e522dd9",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"from agents.specialist_agent import SpecialistAgent\n",
|
||||||
|
"from agents.frontier_agent import FrontierAgent\n",
|
||||||
|
"from agents.random_forest_agent import RandomForestAgent\n",
|
||||||
|
"from agents.my_specialist_agent import MySpecialistAgent\n",
|
||||||
|
"\n",
|
||||||
|
"specialist = SpecialistAgent()\n",
|
||||||
|
"my_specialist = MySpecialistAgent()\n",
|
||||||
|
"frontier = FrontierAgent(collection)\n",
|
||||||
|
"random_forest = RandomForestAgent()\n",
|
||||||
|
"\n",
|
||||||
|
"def description(item):\n",
|
||||||
|
" return item.prompt.split(\"to the nearest dollar?\\n\\n\")[1].split(\"\\n\\nPrice is $\")[0]\n",
|
||||||
|
"def rf(item):\n",
|
||||||
|
" return random_forest.price(description(item))"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "e44dbd25-fb95-4b6b-bbbb-8da5fc817105",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"product = \"Quadcast HyperX condenser mic for high quality audio for podcasting\"\n",
|
||||||
|
"print(specialist.price(product))\n",
|
||||||
|
"print(my_specialist.price(product))\n",
|
||||||
|
"\n",
|
||||||
|
"print(frontier.price(product))\n",
|
||||||
|
"print(random_forest.price(product))"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "1779b353-e2bb-4fc7-be7c-93057e4d688a",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"specialists = []\n",
|
||||||
|
"my_specialists = []\n",
|
||||||
|
"frontiers = []\n",
|
||||||
|
"random_forests = []\n",
|
||||||
|
"prices = []\n",
|
||||||
|
"for item in tqdm(test[1040:1250]):\n",
|
||||||
|
" text = description(item)\n",
|
||||||
|
" specialists.append(specialist.price(text))\n",
|
||||||
|
" my_specialists.append(my_specialist.price(text))\n",
|
||||||
|
" frontiers.append(frontier.price(text))\n",
|
||||||
|
" random_forests.append(random_forest.price(text))\n",
|
||||||
|
" prices.append(item.price)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "f0bca725-4e34-405b-8d90-41d67086a25d",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"mins = [min(s,f,r) for s,ms,f,r in zip(specialists, my_specialists, frontiers, random_forests)]\n",
|
||||||
|
"maxes = [max(s,f,r) for s,ms,f,r in zip(specialists, my_specialists, frontiers, random_forests)]\n",
|
||||||
|
"means = [np.mean([s,ms,f,r]) for s, ms, f, r, in zip(specialists, my_specialists, frontiers, random_forests)]\n",
|
||||||
|
"\n",
|
||||||
|
"X = pd.DataFrame({\n",
|
||||||
|
" 'Specialist': specialists,\n",
|
||||||
|
" 'MySpecialist': my_specialists,\n",
|
||||||
|
" 'Frontier': frontiers,\n",
|
||||||
|
" 'RandomForest': random_forests,\n",
|
||||||
|
" 'Min': mins,\n",
|
||||||
|
" 'Max': maxes,\n",
|
||||||
|
" 'Mean': means,\n",
|
||||||
|
"})\n",
|
||||||
|
"\n",
|
||||||
|
"# Convert y to a Series\n",
|
||||||
|
"y = pd.Series(prices)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "bdb37a84",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# Ensemble GBT"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "1be5be8a-3e7f-42a2-be54-0c7e380f7cc4",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"from sklearn.ensemble import GradientBoostingRegressor\n",
|
||||||
|
"\n",
|
||||||
|
"np.random.seed(42)\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"lr = GradientBoostingRegressor(\n",
|
||||||
|
" n_estimators=150, \n",
|
||||||
|
" max_depth=3, \n",
|
||||||
|
" random_state=42,\n",
|
||||||
|
" learning_rate=0.05,\n",
|
||||||
|
" subsample=0.8,\n",
|
||||||
|
" min_samples_split=4,\n",
|
||||||
|
" min_samples_leaf=2,\n",
|
||||||
|
" max_features='sqrt'\n",
|
||||||
|
")\n",
|
||||||
|
"\n",
|
||||||
|
"lr.fit(X, y)\n",
|
||||||
|
"\n",
|
||||||
|
"feature_columns = X.columns.tolist()\n",
|
||||||
|
"\n",
|
||||||
|
"print(\"Feature importances:\")\n",
|
||||||
|
"for feature, importance in zip(feature_columns, lr.feature_importances_):\n",
|
||||||
|
" print(f\"{feature}: {importance:.4f}\")\n",
|
||||||
|
"\n",
|
||||||
|
"joblib.dump(lr, 'ensemble_model.pkl')"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "e762441a-9470-4dd7-8a8f-ec0430e908c7",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"from agents.ensemble_agent import EnsembleAgent\n",
|
||||||
|
"ensemble = EnsembleAgent(collection)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "1a29f03c-8010-43b7-ae7d-1bc85ca6e8e2",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"ensemble.price(product)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "e6a5e226-a508-43d5-aa42-cefbde72ffdf",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def ensemble_pricer(item):\n",
|
||||||
|
" return max(0,ensemble.price(description(item)))"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "8397b1ef-2ea3-4af8-bb34-36594e0600cc",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"Tester.test(ensemble_pricer, test)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "29c1bcdd",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# More changes"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "16c3f35f",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Added my_specialist_agent"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "9d8f0334",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import modal\n",
|
||||||
|
"from agents.agent import Agent\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"class MySpecialistAgent(Agent):\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" An Agent that runs our fine-tuned LLM that's running remotely on Modal\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
"\n",
|
||||||
|
" name = \"Specialist Agent\"\n",
|
||||||
|
" color = Agent.RED\n",
|
||||||
|
"\n",
|
||||||
|
" def __init__(self):\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" Set up this Agent by creating an instance of the modal class\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" self.log(\"Specialist Agent is initializing - connecting to modal\")\n",
|
||||||
|
" Pricer = modal.Cls.from_name(\"my_pricer-service\", \"Pricer\") #it just points to my modal service with custom model\n",
|
||||||
|
" self.pricer = Pricer()\n",
|
||||||
|
" self.log(\"Specialist Agent is ready\")\n",
|
||||||
|
" \n",
|
||||||
|
" def price(self, description: str) -> float:\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" Make a remote call to return the estimate of the price of this item\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" self.log(\"Specialist Agent is calling remote fine-tuned model\")\n",
|
||||||
|
" result = self.pricer.price.remote(description)\n",
|
||||||
|
" self.log(f\"Specialist Agent completed - predicting ${result:.2f}\")\n",
|
||||||
|
" return result\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "161c5e77",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"## Modified ensemble_agent"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "44398889",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import pandas as pd\n",
|
||||||
|
"from sklearn.linear_model import LinearRegression\n",
|
||||||
|
"import joblib\n",
|
||||||
|
"import numpy as np\n",
|
||||||
|
"from agents.agent import Agent\n",
|
||||||
|
"from agents.specialist_agent import SpecialistAgent\n",
|
||||||
|
"from agents.frontier_agent import FrontierAgent\n",
|
||||||
|
"from agents.random_forest_agent import RandomForestAgent\n",
|
||||||
|
"from agents.my_specialist_agent import MySpecialistAgent\n",
|
||||||
|
"\n",
|
||||||
|
"specialist = SpecialistAgent()\n",
|
||||||
|
"\n",
|
||||||
|
"class EnsembleAgent(Agent):\n",
|
||||||
|
"\n",
|
||||||
|
" name = \"Ensemble Agent\"\n",
|
||||||
|
" color = Agent.YELLOW\n",
|
||||||
|
" \n",
|
||||||
|
" def __init__(self, collection):\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" Create an instance of Ensemble, by creating each of the models\n",
|
||||||
|
" And loading the weights of the Ensemble\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" self.log(\"Initializing Ensemble Agent\")\n",
|
||||||
|
" self.specialist = SpecialistAgent()\n",
|
||||||
|
" self.my_specialist = MySpecialistAgent() #added my specialist\n",
|
||||||
|
" self.frontier = FrontierAgent(collection)\n",
|
||||||
|
" self.random_forest = RandomForestAgent() #my model here is a cabtoost regularized and pruned\n",
|
||||||
|
" self.model = joblib.load('ensemble_model.pkl') #my model is actually a gbt\n",
|
||||||
|
" self.log(\"Ensemble Agent is ready\")\n",
|
||||||
|
"\n",
|
||||||
|
" def price(self, description: str) -> float:\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" Run this ensemble model\n",
|
||||||
|
" Ask each of the models to price the product\n",
|
||||||
|
" Then use the Linear Regression model to return the weighted price\n",
|
||||||
|
" :param description: the description of a product\n",
|
||||||
|
" :return: an estimate of its price\n",
|
||||||
|
" \"\"\"\n",
|
||||||
|
" self.log(\"Running Ensemble Agent - collaborating with specialist, frontier and random forest agents\")\n",
|
||||||
|
" specialist = self.specialist.price(description)\n",
|
||||||
|
" my_specialist = self.my_specialist.price(description) #added my specialist estimate\n",
|
||||||
|
" frontier = self.frontier.price(description)\n",
|
||||||
|
" random_forest = self.random_forest.price(description)\n",
|
||||||
|
" X = pd.DataFrame({\n",
|
||||||
|
" 'Specialist': [specialist],\n",
|
||||||
|
" 'MySpecialist': [my_specialist],\n",
|
||||||
|
" 'Frontier': [frontier],\n",
|
||||||
|
" 'RandomForest': [random_forest],\n",
|
||||||
|
" 'Min': [min(specialist, frontier, random_forest)],\n",
|
||||||
|
" 'Max': [max(specialist, frontier, random_forest)],\n",
|
||||||
|
" 'Mean': [np.mean([specialist, my_specialist, frontier, random_forest])], #added the mean and myspecialist prediction.\n",
|
||||||
|
" })\n",
|
||||||
|
" y = max(0, self.model.predict(X)[0])\n",
|
||||||
|
" self.log(f\"Ensemble Agent complete - returning ${y:.2f}\")\n",
|
||||||
|
" return y"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"kernelspec": {
|
||||||
|
"display_name": ".venv",
|
||||||
|
"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.12.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 5
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user