Projects On Sale!If you're interested in buying any of my projects, please reach out to me!

Super Guten

August 12, 2024

superguten-opengraph-image
You can check this hacky experiment out here.
Or watch the loom video.
Google had a Gemini API competition due this week with prizes up to a $100K and a DeLorean, so I had to participate. 😃 My entry was SuperGuten: a better more modern version of Project Gutenberg—a service that lets you find classic books that are copyright-free. It's an awesome resource but the website is pretty dated, and the search functionality is basic. Gemini's current advantage is its long context capability (up to 2 million tokens) and its generous free tier (15 requests for Gemini Flash). So, I leveraged that for summarizing these huge books. And I built a modern Next.js website with a slick search feature that lets you find books based not just on keywords but on semantic meaning. You can search by book themes, author, period, etc. I first ran a script to generate structured summaries for around 4,000-5,000 of the most popular books on Project Gutenberg, sorted by download count. Then, I indexed them in my database and created embeddings based on the summaries. This allowed me to create a hybrid search index based on important keywords (title, author) + embeddings, etc. Supabase has a great article on settings this up. Now I had a nice site with generated summaries. Cool. But I wanted to go further, so I added a style option where you could rewrite the book in a style you like. Think Shakespeare in tweet form or Gen Z slang. It's similar to those "Thug Notes" explanations of classic literature, if you've ever seen the YouTube series. I added some default styles to choose from, but you can input your own custom style as well. Try it out and let your imagination go wild!
You can check this hacky experiment out here.