Skip to content

armgit / camel

Public Imported from GitHub
0

๐Ÿซ CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

2.3 KB
Raw Blame

๐ŸŽฅ YouTube Video Q&A with CAMEL (Audio + Visual OCR)

This project enables users to input a YouTube URL and ask questions about the video's spoken content and on-screen text (e.g., PPT slides). It integrates:

  • โœ… Audio transcription via Whisper
  • ๐Ÿ–ผ๏ธ Visual OCR from extracted video frames
  • ๐Ÿง  CAMEL AI multi-agent reasoning
  • ๐ŸŒ Streamlit interface for interaction

๐Ÿš€ Features

  • Downloads YouTube videos via CAMEL toolkit
  • Transcribes audio using OpenAI Whisper
  • Extracts key video frames at regular intervals
  • Performs OCR on frames to extract visible text
  • Combines transcript and OCR data as knowledge
  • Allows users to ask questions answered by CAMEL agent

๐Ÿ“ฆ Requirements

Install Python packages with specific versions:

pip install -r requirements.txt

๐Ÿงฐ Also install system dependencies:

Tesseract OCR:

  • Windows: Download here
  • macOS:
    brew install tesseract
    
  • Ubuntu:
    sudo apt-get install tesseract-ocr
    

FFmpeg (required by Whisper and for frame extraction):

  • Windows: Download here (add /bin to PATH)
  • macOS:
    brew install ffmpeg
    
  • Ubuntu:
    sudo apt-get install ffmpeg
    

๐Ÿ› ๏ธ Setup for Windows

If Tesseract is not found, add this in your Python code:

import pytesseract
pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"

Ensure the path is correct based on your installation.


๐Ÿงช Run the App

streamlit run app.py

Then, open the Streamlit interface in your browser.


๐Ÿ“ File Structure

app.py          # Main Streamlit app
README.md       # This file
requirements.txt  # Python dependencies

๐Ÿง  Powered By


๐Ÿ’ฌ Example Usage

  1. Paste a YouTube link of a tech tutorial with slides.
  2. Ask: "What is the title of the slide shown at 5 minutes?"
  3. The app returns relevant text from OCR and transcript.