This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pip install openai | |
| #pip install YouTubeTranscriptApi | |
| from youtube_transcript_api import YouTubeTranscriptApi | |
| import sys | |
| import json | |
| from openai import OpenAI | |
| #Set OPENAI_API_KEY in the the env | |
| if len(sys.argv) == 2: | |
| #fetch transcript from youtube video using video ID |