akshil-jain commited on
Commit
df453a5
·
verified ·
1 Parent(s): 97c2b63

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +79 -74
README.md CHANGED
@@ -1,74 +1,79 @@
1
- # Video Transcript Chatbot
2
-
3
- A beginner-friendly Gradio app that turns any YouTube video into a conversational chatbot using LangChain and Hugging Face Inference API.
4
-
5
- ---
6
-
7
- ## Features
8
-
9
- - **Dynamic Video Input**: Paste a full YouTube URL or raw video ID.
10
- - **Embedding Model Selection**: Pick any HF embedding model (default: `sentence-transformers/all-MiniLM-L6-v2`).
11
- - **LLM Model Selection**: Choose any HF text-generation model (default: `meta-llama/Llama-3.1-8B-Instruct`).
12
- - **Secure Token Entry**: You must enter your own HF API token at runtime—no hard-coded defaults.
13
- - **Conversational Memory**: Multi-turn chat history is preserved.
14
- - **Retrieval-Augmented Generation**: Uses FAISS + transcript context to ground answers.
15
-
16
- ---
17
-
18
- ## Prerequisites
19
-
20
- - **Python 3.8+**
21
- - **Hugging Face API Token** with Inference access:
22
- https://huggingface.co/settings/tokens
23
- - **Git** (for cloning the repo)
24
-
25
- ---
26
-
27
- ## Installation
28
-
29
- 1. **Clone the repo**
30
- ```bash
31
- git clone https://github.com/<your-username>/yt-rag-chatbot.git
32
- cd yt-rag-chatbot
33
- 2. **(Optional) Create a virtual environment**
34
- ```bash
35
- python -m venv venv
36
- source venv/bin/activate # macOS/Linux
37
- venv\Scripts\activate # Windows
38
- 3. **Install dependencies**
39
- ```bash
40
- python -m venv venv
41
- source venv/bin/activate # macOS/Linux
42
- venv\Scripts\activate # Windows
43
-
44
- **Usage**
45
- 1. **Start the app:**
46
- ```bash
47
- python app.py
48
- 2. **Open** your browser at the local URL (e.g. http://127.0.0.1:7860)
49
- 3. **Use the UI:**
50
-
51
- - **YouTube Video URL or ID:** Paste your link/ID.
52
-
53
- - **Embedding Model:** Leave default or enter another HF embedding model.
54
-
55
- - **LLM Model:** Enter your desired HF LLM repo.
56
-
57
- - **Your HF API Token:** Paste your token (input hidden).
58
-
59
- - Click **Initialize Chat** to load and index the transcript.
60
-
61
- - Ask questions in the chat window to interact with the video content.
62
-
63
-
64
- **Customization**
65
-
66
- - **Default Models:** Edit the default values for embedding_model_input and llm_model_input in app.py.
67
-
68
- - **Retrieval Size:** Change the k value in the retriever configuration:
69
- ```python
70
- retriever = vector_store.as_retriever(search_kwargs={'k': 4})
71
-
72
-
73
-
74
-
 
 
 
 
 
 
1
+ ---
2
+ title: Video Transcript Chatbot
3
+ emoji: 🎥
4
+ colorFrom: yellow
5
+ colorTo: indigo
6
+ sdk: gradio
7
+ python_version: '3.10'
8
+ ---
9
+
10
+ # Video Transcript Chatbot
11
+
12
+ A beginner-friendly Gradio app that turns any YouTube video into a conversational chatbot using LangChain and Hugging Face Inference API.
13
+
14
+ ---
15
+
16
+ ## Features
17
+
18
+ - **Dynamic Video Input**: Paste a full YouTube URL or raw video ID.
19
+ - **Embedding Model Selection**: Pick any HF embedding model (default: `sentence-transformers/all-MiniLM-L6-v2`).
20
+ - **LLM Model Selection**: Choose any HF text-generation model (default: `meta-llama/Llama-3.1-8B-Instruct`).
21
+ - **Secure Token Entry**: You must enter your own HF API token at runtime—no hard-coded defaults.
22
+ - **Conversational Memory**: Multi-turn chat history is preserved.
23
+ - **Retrieval-Augmented Generation**: Uses FAISS + transcript context to ground answers.
24
+
25
+ ---
26
+
27
+ ## Prerequisites
28
+
29
+ - **Python 3.8+**
30
+ - **Hugging Face API Token** with Inference access:
31
+ https://huggingface.co/settings/tokens
32
+ - **Git** (for cloning the repo)
33
+
34
+ ---
35
+
36
+ ## Installation
37
+
38
+ 1. **Clone the repo**
39
+ ```bash
40
+ git clone https://github.com/<your-username>/yt-rag-chatbot.git
41
+ cd yt-rag-chatbot
42
+ 2. **(Optional) Create a virtual environment**
43
+ ```bash
44
+ python -m venv venv
45
+ source venv/bin/activate # macOS/Linux
46
+ venv\Scripts\activate # Windows
47
+ 3. **Install dependencies**
48
+ ```bash
49
+ python -m venv venv
50
+ source venv/bin/activate # macOS/Linux
51
+ venv\Scripts\activate # Windows
52
+
53
+ **Usage**
54
+ 1. **Start the app:**
55
+ ```bash
56
+ python app.py
57
+ 2. **Open** your browser at the local URL (e.g. http://127.0.0.1:7860)
58
+ 3. **Use the UI:**
59
+
60
+ - **YouTube Video URL or ID:** Paste your link/ID.
61
+
62
+ - **Embedding Model:** Leave default or enter another HF embedding model.
63
+
64
+ - **LLM Model:** Enter your desired HF LLM repo.
65
+
66
+ - **Your HF API Token:** Paste your token (input hidden).
67
+
68
+ - Click **Initialize Chat** to load and index the transcript.
69
+
70
+ - Ask questions in the chat window to interact with the video content.
71
+
72
+
73
+ **Customization**
74
+
75
+ - **Default Models:** Edit the default values for embedding_model_input and llm_model_input in app.py.
76
+
77
+ - **Retrieval Size:** Change the k value in the retriever configuration:
78
+ ```python
79
+ retriever = vector_store.as_retriever(search_kwargs={'k': 4})