My First AI Project: yapprz.com

Hemanta Sundaray

Published October 26, 2023


Finally, I decided to jump on the AI bandwagon. I made an app that summarizes YouTube comments, and it's called yapprz.com. All you do is enter a YouTube video URL, specify the number of comments you want to summarize, and hit the "Summarize" button. That’s it. Within a few minutes, you receive a summary document.

How Does the App Work?

It’s pretty simple. The app makes a POST request to the YouTube Data API to fetch comments and then sends those comments to OpenAI's API - GPT 3.5 and GPT-4 - for summarization. The function that makes these API calls to OpenAI is an AWS Lambda function.

The reason I chose AWS Lambda has to do with my current hosting setup. My app runs on Vercel's hobby plan, which is free. However, there’s a catch: the plan caps serverless functions at a 10-second execution time. This wasn't enough for the comment summarization process, so I needed an alternative. I considered Vercel Pro, which bumps the limit up to 300 seconds, but at $20 a month, it was too expensive for me. That's why AWS Lambda, which only bills me for the actual execution time, was a more cost-effective option.

Techstack

The tech stack for yapprz.com includes:

Learnings

I learned a lot while working on this project. It was my first experience with YouTube Data API, OpenAI API, AWS Lambda, and integrating Stripe webhook. Although I had previously integrated Stripe Checkout, I used to update the database from the client side after a customer made a successful payment, which is not the most secure approach.

My Next AI Project

In a few days, I'll be starting another AI project. I plan to reuse much of the existing code, especially the authentication and Stripe integration modules. The new project requires web scraping, something I’ll have to learn. I’ll also have to figure out a way to decouple long-running AI processing tasks from the HTTP requests to improve user experience. The goal is to avoid making users wait for 10 to 15 minutes for heavy AI tasks to complete, which is not an ideal user experience. Instead, they should quickly receive a confirmation that their task is running in the background, and once it's complete, an email will be sent to them. Based on my initial research, Amazon SQS seems like the right tool for this job.

So, that's it for now. If you run a YouTube channel and your videos get good engagement, I'd love for you to test out yapprz.com and share your feedback. My new project should be ready in about a month. There's lots of coding to do, and I can't wait to share it with you. See you soon!