Get summary of YouTube videos using captions and ChatGPT. Get summary vie API + Chrome extension or Telegram bot.
Folder 'summarizer' is the main service folder that is responsible for summarization.
OPENAI_API_KEY=xx-.....
You can also set telegram bot token and chat id in .env file, if you want to use telegram bot.
TELEGRAM_TOKEN=xxxxx:.....
TELEGRAM_WEBHOOK=https://[some-url].vercel.app
You should run it from docker compose in root folder of the project.
docker-compose up -d
Then share via ngrok
ngrok http 5000
And finally set url in chrome extension 'script.js' file
const url = 'https://<your_ngrok_url>/api/summarize';
Install chome extension from local folder 'chrome-extension' and run it.
curl -F "url=https://<your_ngrok_url>/bot/telegram" https://api.telegram.org/bot<your_bot_token>/setWebhook
docker-compose up -d
You can use Telegram bot to get summary of YouTube videos. Just send link to video to bot and it will reply with summary.
/summary https://www.youtube.com/watch?v=QH2-TGUlwu4
You can customize prompt for summarization in 'summarizer' folder in 'app.py' file.
prompt = f"""This video is about {video_title}.
{video_description}
"""