From dfd4aed4e4edd55d234a83aeeb19da190e4c476c Mon Sep 17 00:00:00 2001 From: ethan Date: Mon, 16 Dec 2024 23:57:47 -0800 Subject: [PATCH] update video url --- notebooks/multimodal-rag/multimodal-rag-llamaindex.ipynb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/notebooks/multimodal-rag/multimodal-rag-llamaindex.ipynb b/notebooks/multimodal-rag/multimodal-rag-llamaindex.ipynb index ff1ad32b893..017bf04fcee 100644 --- a/notebooks/multimodal-rag/multimodal-rag-llamaindex.ipynb +++ b/notebooks/multimodal-rag/multimodal-rag-llamaindex.ipynb @@ -75,7 +75,6 @@ " \"moviepy==1.0.3\" \\\n", " \"librosa\" \\\n", " \"python-ffmpeg<=1.0.16\" \\\n", - " \"yt-dlp\" \\\n", " \"open_clip_torch\" \\\n", " \"huggingface_hub\" \\\n", " \"gradio>=4.44.1\" --extra-index-url https://download.pytorch.org/whl/cpu" @@ -291,12 +290,12 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": null, "id": "093464db-893e-4813-a6cc-19473a1a890c", "metadata": {}, "outputs": [], "source": [ - "video_url = \"https://www.youtube.com/watch?v=d_qvLDhkg00\"\n", + "video_url = \"https://github.com/user-attachments/assets/2e38afa5-ce3e-448c-ad1a-0e9471039ff1\"\n", "output_video_path = \"./video_data/\"\n", "output_folder = \"./mixed_data/\"\n", "output_audio_path = \"./mixed_data/output_audio.wav\"\n", @@ -305,7 +304,9 @@ "Path(output_folder).mkdir(parents=True, exist_ok=True)\n", "\n", "if not Path(filepath).exists():\n", - " !yt-dlp {video_url} -f best -o {filepath}" + " r = requests.get(video_url)\n", + " with Path(filepath).open(\"wb\") as f:\n", + " f.write(r.content)" ] }, {