Skip to content

samagra44/Youtube-ChatBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Youtube Video Q&A

This repository contains a Python application that allows you to ask questions about a YouTube video and receive concise answers based on the video's content. The application uses the Langchain library for text processing, Hugging Face for embeddings, and OpenAI for question answering.

Table of Contents

  1. Installation
  2. Environment Setup
  3. Running the Application
  4. Usage
  5. Acknowledgements

Installation

To install the required dependencies, run the following command in your terminal:

pip install -r requirements.txt

Environment Setup

  1. Create a .env file in the root directory of the project and add the following environment variables:
HUGGINGFACEHUB_API_TOKEN=your_huggingface_api_token
OPENAI_API_KEY=your_openai_api_key

Replace your_huggingface_api_token and your_openai_api_key with your actual API keys.

  1. Load the environment variables in your Python script:
import os
load_dotenv()

Running the Application

Run the following command in your terminal to run the application:

python app.py

Usage

  1. Enter a YouTube video URL in the provided textbox.
  2. Click the "Submit URL" button to process the video and make it available for questions.
  3. Once the video is processed, you can ask questions about the video in the chat interface.
  4. Click the "Ask Question" button to receive an answer based on the video's content.
  5. You can clear the chat history by clicking the "Clear Chat" button.

Output

animated

Acknowledgements

This project uses the following libraries:

About

Python application that allows you to ask questions about a YouTube video.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages