Skip to content

NicolasCort/Chat_AI_YT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README.md

Introduction

This is a Streamlit app for chatting with YouTube videos using Langchain, a Python library for building AI-powered chatbots that can answer questions based on documents. The app allows users to input a YouTube video URL, which is then transcribed and indexed to allow users to ask questions about the video. The app uses OpenAI for text embeddings and Langchain for question-answering with context.

Red Professional Business YouTube Thumbnail

Requirements

  • Python 3.7 or above
  • Required packages: langchain, streamlit, openai
  • A valid OpenAI API key

Usage

  1. Clone the repository
  2. Install the required packages using pip install -r requirements.txt
  3. Set your OpenAI API key by running the command streamlit run main.py and entering your key in the sidebar.
  4. Run the app using streamlit run main.py
  5. Enter a YouTube video URL in the sidebar and click submit.
  6. Ask a question about the video in the text area and click submit.

Files

  • main.py: The main file containing the Streamlit app.
  • yt_loader.py: Contains the function ingest_youtube_video_url for transcribing YouTube videos.
  • utils.py: Contains helper functions for processing the video transcript and embedding the text.
  • template.py: Contains the prompt template used for Langchain's question-answering model.

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages