Inspiration
We've all had trouble thinking of a good gift for a friend or family member. We thought we could leverage the incredible power of cutting-edge language models to help generate gift ideas based on a short personal description.
What it does
The user simply enters a short description of the person they want to buy a gift for (such as "a man in his mid 20s who studies computer science and enjoys hiking"). This description can be as simple or as detailed as the user desires, though a more in-depth description will likely lead to more personalized recommendations. Then, after just a few seconds, the user is shown a list (usually around 4-6) of gift ideas, complete with links to multiple matching products across online shopping platforms like Amazon and Etsy.
How we built it
Our frontend is built in React. It queries our backend, built with Flask, which processes the description and uses OpenAI's GPT3 api to generate a suitable list of gift ideas. The backend then uses keywords from the GPT3 text completion, and utilizes Concurrent Multithreading of APIs, Web Scraping, and proxies to gather data from Amazon, Etsy, and Uncommon Goods to find specific product information, links, and images. The webpage is then dynamically updated to display product information, with pictures, prices, and a link to the store page.
Challenges we ran into
OpenAI has many different engines and parameters for various types and quantities of their language model — finding the right combination of settings and fine tuning the prompt took a great deal of testing and experimentation to consistently get reasonable gift ideas in the correct format.
Getting product information from online shopping platforms was also quite challenging. While most sites like Amazon have APIs to get product information from keywords, they have a lengthy approval process and waiting period to actually get a working API key. So, we had to resort to web scraping to get the necessary data, which presented a host of problems with reliability and data formatting (such as Amazon temporarily locking us out of automated access while we were testing the site). Additionally, even when the web scraping worked it was often slow because of the number of web pages that needed to load before data could be returned (sometimes upwards of 30 product pages for a single gift recommendation request), so we had to make the web scraping process concurrent, using python’s native multi-threading tools.
Accomplishments that we're proud of
The problem we are addressing is prevalent, and we believe that our website can actually help people (or at least give them some gift inspiration). Despite many challenges, the site works wonderfully! The site’s functionality can always be improved, but for 24 hours our website is aesthetically pleasing and gives a quality list of real products. We also believe our idea could be economically viable by adding affiliate links to recommended products.
What we learned
This exact stack (React frontend, Flask backend) was a stack that no team member had used before, so we learned a great deal both about the individual technologies and the nuances of integrating them together. We improved our project management skills. We were able to leverage individual team members’ past technical experience to complete the project more quickly than if we had randomly assigned tasks.We also did not have previous first hand experience working with large language models, and have learned much more about the capabilities and idiosyncrasies of cutting edge artificial intelligence.
What's next for The Gift Whisperer
Reworking the site to use Amazon affiliate links or something similar to generate some revenue would make the site more viable on a large scale, as the API calls to OpenAI cost money per word generated (past the initial free credit provided to new users). We would also like to continue to experiment with OpenAI’s more advanced parameters and top-tier commercial models, to improve the quality and consistency of the gift recommendations.
Built With
- etsy-api
- flask
- flask-restful
- multi-threading
- openai-api
- python
- react
- typescript
- web-scraping

Log in or sign up for Devpost to join the conversation.