Skip to content

Instantly share code, notes, and snippets.

View Belphemur's full-sized avatar

Antoine Aflalo Belphemur

View GitHub Profile
@Belphemur
Belphemur / main.py
Last active March 13, 2024 10:44
Summarize Youtube Recipe video into text intruction with OpenAI ChatGPT and Whisper
from pytube import YouTube
from moviepy.editor import *
import openai
import textwrap
openai.api_key = "YOUR KEY"
def download_youtube_video(url, output_path):
yt = YouTube(url)
video = yt.streams.filter(file_extension='mp4').first()
video.download(output_path)