Gift Finder Model

This model helps extract information about gift recipients from conversations and generates appropriate gift search queries.

Model Description

This model uses sentence transformers to analyze conversations and extract key information about:

  • Gift occasion (birthday, holiday, etc.)
  • Relationship to the recipient
  • Age of the recipient
  • Interests/hobbies of the recipient
  • Budget for the gift

After extraction, it generates a search query that can be used to find appropriate gifts.

SerpAPI Integration

This model now supports integration with SerpAPI for real product searches. See THIRD_PARTY_INTEGRATION.md for implementation details.

Usage

from transformers import pipeline
from gift_finder_model import GiftFinderModel

model = GiftFinderModel()

# Example conversation
conversation = """
USER: I need to find a gift for my brother's birthday. He's in his 20s and loves playing basketball and video games. I don't want to spend more than $50.
ASSISTANT: I'd be happy to help you find a birthday gift for your brother who loves basketball and video games within your $50 budget.
"""

result = model.process_conversation(conversation)
print(result)

Output Example

{
  "extracted_data": {
    "occasion": "birthday",
    "recipient_relationship": "brother",
    "recipient_age": "young adult",
    "recipient_interests": "basketball and video games",
    "budget": "moderate"
  },
  "gift_search_query": "birthday gift for brother who enjoys basketball and video games under $50"
}

Using with SerpAPI for Real Product Recommendations

from gift_finder_api import GiftFinderAPI

# Initialize the API
api = GiftFinderAPI()

# Get recommendations with real product search
recommendations = api.get_gift_recommendations(
    conversation="...",
    num_recommendations=5,
    search_api_key="your_serpapi_key"  # Pass your SerpAPI key here
)

# Display recommendations
for rec in recommendations:
    print(f"{rec['name']} - {rec['price']}")
    print(f"{rec['description']}")
    print(f"{rec['url']}")
Downloads last month
1
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support