A web application that uses AI to answer questions about YouTube video content. Built with Streamlit for the frontend, and LangChain with OpenAI for processing and querying video transcripts.
- Interactive User Interface: Allows users to input YouTube video URLs and ask questions about the video.
- AI-Driven Responses: Uses OpenAI's language model to generate detailed answers based on video transcripts.
- Efficient Document Retrieval: Implements FAISS for fast and accurate search within video transcripts.
- Streamlit: For building the web interface.
- LangChain: For handling video transcripts and AI-based responses.
- OpenAI: For generating responses to user queries.
- FAISS: For efficient document retrieval and similarity search.
- Python: The programming language used.
-
Clone the Repository
git clone https://github.com/iiTzMohit/YTQueryBot.git cd YTQueryBot
-
Create and Activate a Virtual Environment
python -m venv venv source venv/bin/activate # On Windows use `.venv/Scripts/Activate.ps1`
-
Install Dependencies
pip install -r requirements.txt
-
Set Up Environment Variables
OPENAI_API_KEY=your_openai_api_key
-
Run the Application
streamlit run main.py
-
Open the Application
- Open your web browser and go to https://localhost:8501.
-
Interact with the Application
- Enter the YouTube video URL in the sidebar.
- Ask a question about the video content.
- Submit the form to receive a detailed response.
- main.py: Contains the Streamlit application code for the user interface and handling form submissions.
- langchain_helper.py: Includes functions for processing video transcripts, querying with OpenAI, and integrating FAISS for document retrieval.
This project was inspired by and developed based on the YouTube tutorial by @rishabincloud. Special thanks to @rishabincloud for providing detailed guidance and resources.
- YouTube Tutorial: LangChain Crash Course for Beginners
For any questions or issues, please reach out to [email protected].