Giter Club home page Giter Club logo

rag-for-video's Introduction

Question Answering Chatbot with Video

Overview

  • This is a simple Chatbot that can help user to QA about information of a video.
  • For the current version:
    • chatbot can only receive Youtube video url as input.
    • just allow user to input message as text, not image yet
  • Chatbot using GPT4o as base LLM.
  • Demo: demo

Process flow:

  • This chatbot basically use idea of RAG, the pipeline has the following steps:
    • First: It will ask user to input a YouTube video url
      • Video Processor:
        • After receive the url, it will download it to the temporal directory using tempfile lib of python.
        • Then it will convert the video into images (it's also base on the video fps of your setting) and convert video audio into text.
      • Retriever Processor:
        • This processor will receive the folder path of image frames and audio, and it will index the data.
    • Second: After processing the video (it might take you some minutes to finish), user now can input text message and ask about the information in the video.

Installation

  • Install required packages: pip install -r requirements.txt
  • Install ffmpeg: conda install conda-forge::imageio-ffmpeg

Running

  • For the current version, it is highly recommended that you should running with Terminal, because gradio app may still have some bugs.

Terminal

  • You can test the bot in terminal by running: python launch.py
  • You also have to set the OPENAI_API_KEY env variable to use gpt4o

Gradio

  • Also, you can run the chatbot with UI by running: python gradio_app.py

Proposal

  • For current version, the chatbot does not handle images as input message, but in I think we can implement this feature by:
    • Step 1: With each input message, use gpt4o to generate the summarize for that image.
    • Step 2: Use that summarized text to and retrieve a list of relevant images using retriever processor.
    • Step 3: Use these retrieved images + input text of user and input it to gpt4o, and return to user the response.

rag-for-video's People

Contributors

spartan-minhbui avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.