Omid-sar commited on
Commit
d8296fc
·
1 Parent(s): 510cadb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +61 -13
README.md CHANGED
@@ -1,13 +1,61 @@
1
- ---
2
- title: YouTube Transcript Analyzer
3
- emoji: 📉
4
- colorFrom: yellow
5
- colorTo: blue
6
- sdk: streamlit
7
- sdk_version: 1.27.0
8
- app_file: app.py
9
- pinned: false
10
- license: openrail
11
- ---
12
-
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # YouTube Video Transcript Analyzer
3
+
4
+ ## Goal
5
+
6
+ The goal of this application is to analyze YouTube video transcripts. It takes a YouTube video URL and a user-input question, processes the video transcript, performs a similarity search to find the most related chunk of the transcript, and then sends it to OpenAI to generate a comprehensive response based on the provided question.
7
+
8
+ ## Overview
9
+
10
+ The application uses the `langchain` library to handle various tasks such as loading YouTube video transcripts, converting transcripts to embeddings, performing similarity searches, and integrating with OpenAI's language models. The application is built using Streamlit, which provides an interactive user interface for inputting the video URL and the question.
11
+
12
+ ## Features
13
+
14
+ - **YouTube Video Transcript Loading**: Load and process YouTube video transcripts using `YoutubeLoader` from the `langchain` library.
15
+ - **Text Splitting**: Split the transcript into manageable chunks using `RecursiveCharacterTextSplitter`.
16
+ - **Embeddings Conversion**: Convert video transcripts to embeddings using `OpenAIEmbeddings`.
17
+ - **Similarity Search**: Perform a similarity search to find the most relevant section of the transcript using `Chroma`.
18
+ - **OpenAI Integration**: Utilize OpenAI's language models to generate responses based on the processed transcript and user-input question.
19
+
20
+ ## Prerequisites
21
+
22
+ - Python 3.x
23
+ - Streamlit
24
+ - OpenAI API Key
25
+
26
+ ## Setup and Installation
27
+
28
+ 1. Clone the repository:
29
+ ```sh
30
+ git clone https://github.com/omid-sar/YouTube-Assistant-LangChain.git
31
+ cd YouTube-Assistant-LangChain
32
+ ```
33
+
34
+ 2. Install the required libraries:
35
+ ```sh
36
+ pip install -r requirements.txt
37
+ ```
38
+
39
+ 3. Set up your OpenAI API key as an environment variable:
40
+ ```sh
41
+ export OPENAI_API_KEY=your_api_key_here
42
+ ```
43
+
44
+ ## Usage
45
+
46
+ 1. Run the Streamlit app:
47
+ ```sh
48
+ streamlit run app.py
49
+ ```
50
+
51
+ 2. Open the app in your web browser and input the YouTube video URL and your question about the video.
52
+
53
+ 3. The app will process the video transcript, perform a similarity search, and use OpenAI to generate a response, which will be displayed on the screen.
54
+
55
+
56
+ ## License
57
+
58
+ This project is licensed under the MIT License - see the [LICENSE](https://github.com/git/git-scm.com/blob/main/MIT-LICENSE.txt) file for details.
59
+ ```
60
+
61
+