Downloads · 30 days
8
14% of all-time downloads
mehdirben/gift-finder
gift-finder is a feature extraction model from mehdirben. Use it when you need embeddings to search or compare text. It is set up for sentence-transformers. The card lists the license as mit.
This model helps extract information about gift recipients from conversations and generates appropriate gift search queries.
Downloads · 30 days
8
14% of all-time downloads
All-time downloads
58
Public
Repo size
90.9 MB
Likes
0
Public
Click a slice to open those files.
.safetensors90.9 MB · 99%
From the Hugging Face model README
This model helps extract information about gift recipients from conversations and generates appropriate gift search queries.
This model uses sentence transformers to analyze conversations and extract key information about:
After extraction, it generates a search query that can be used to find appropriate gifts.
This model now supports integration with SerpAPI for real product searches. See THIRD_PARTY_INTEGRATION.md for implementation details.
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)
{
"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"
}
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']}")