Update app.py
Browse files4 unmodified lines567881011910111213141524 unmodified lines40414244454643444550464748534950515220 unmodified lines737475807677784 unmodified linesfrom phi.tools.duckduckgo import DuckDuckGofrom google.generativeai import upload_file, get_fileimport google.generativeai as genai
import timefrom pathlib import Pathfrom dotenv import load_dotenvimport osfrom pathlib import Pathimport tempfilefrom dotenv import load_dotenv
# Load environment variablesload_dotenv()24 unmodified linesmultimodal_Agent = initialize_agent()
# Function to download YouTube video using yt-dlpfrom yt_dlp import YoutubeDLimport tempfile
def download_youtube_video(youtube_url): """ Downloads a YouTube video using yt-dlp with cookies for authentication.
Parameters: - youtube_url: The URL of the YouTube video.
Returns: - The path to the downloaded video file. """20 unmodified lines except Exception as e: raise RuntimeError(f"An error occurred while downloading the video: {str(e)}")
# YouTube video URL inputyoutube_url = st.text_input( "Enter the YouTube video link",app.py+4-9