simplytaps commited on
Commit
6875741
Β·
verified Β·
1 Parent(s): e087b2a

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +57 -75
README.md CHANGED
@@ -16,72 +16,82 @@ Transform any YouTube video into a comprehensive, book-style summary using AI (G
16
 
17
  ---
18
 
19
- ## Features
20
 
21
- - **🎬 YouTube URL Input**: Paste any YouTube URL to extract transcript automatically
22
- - **πŸ“ Manual Transcript**: Paste transcripts manually as backup option
23
- - **πŸ€– AI-Powered Summaries**: Uses Groq's fast LLM (Llama 3.3 70B) for intelligent summarization
24
- - **πŸ“– Book-Style Output**: Generates structured summaries with chapters, key concepts, and takeaways
25
- - **πŸ“₯ Multiple Formats**: Download as PDF, Word document, or Markdown
26
- - **⏱️ Video Duration**: Shows speaking rate and reading time statistics
 
 
 
27
 
28
  ---
29
 
30
- ## How to Use
 
 
 
 
 
 
 
 
 
31
 
32
- ### Option 1: YouTube URL (Primary Method)
33
- 1. Go to **"YouTube URL"** tab
34
- 2. Paste any YouTube URL
35
- 3. Select transcript language (default: English)
36
- 4. Click **"πŸš€ Generate Summary"**
37
 
38
- ### Option 2: Manual Transcript (Backup)
39
- 1. Go to **"πŸ“ Manual Transcript"** tab
40
- 2. Paste the transcript text
41
- 3. Add video title (optional)
42
- 4. Add video duration like `10:30` (optional)
43
  5. Click **"πŸš€ Generate Summary from Transcript"**
44
 
 
 
 
 
 
 
 
45
  ---
46
 
47
  ## Required Setup (One-Time)
48
 
49
- ### Step 1: Get Groq API Key
50
 
51
  1. Visit [console.groq.com](https://console.groq.com/)
52
  2. Sign up for **FREE** account
53
- 3. Click **"API Keys"** in sidebar
54
- 4. Click **"Create API Key"**
55
- 5. Copy the key (starts with `gsk_`)
56
 
57
- ### Step 2: Add Secret to HF Space
58
 
59
- 1. Go to: [Space Settings](https://huggingface.co/spaces/simplytaps/Youtube-sum/settings)
60
  2. Scroll to **"Repository Secrets"**
61
- 3. Click **"New Secret"**
62
- 4. Enter:
63
  - **Name**: `GROQ_API_KEY`
64
- - **Value**: Your API key (e.g., `gsk_xxxxx...`)
65
- 5. Click **"Add Secret"**
66
- 6. **Restart** the Space (click "Factory reboot")
67
 
68
  ---
69
 
70
  ## Output Structure
71
 
72
- The generated summary includes:
73
-
74
  | Section | Description |
75
  |---------|-------------|
76
- | **Executive Overview** | High-level summary (2-3 paragraphs) |
77
- | **Introduction** | Background and context |
78
- | **Chapter-by-Chapter Summary** | Detailed breakdown |
79
- | **Key Concepts** | Important terms explained |
80
- | **Key Takeaways** | Numbered main insights |
81
- | **Memorable Quotations** | Notable quotes from video |
82
- | **Practical Applications** | How to apply the knowledge |
83
- | **Critical Analysis** | Strengths and limitations |
84
- | **Quick Bullet Summary** | TL;DR bullet points |
85
 
86
  ---
87
 
@@ -89,46 +99,18 @@ The generated summary includes:
89
 
90
  | Problem | Solution |
91
  |---------|----------|
92
- | "API key error" | Add `GROQ_API_KEY` to Space secrets |
93
- | "Rate limit exceeded" | Get your own API key from console.groq.com |
94
- | "Transcript not found" | Video may not have captions; use Manual Transcript tab |
95
- | App not loading | Wait 1-2 minutes for Space to start |
96
 
97
  ---
98
 
99
  ## Technical Stack
100
 
101
- | Component | Technology |
102
- |-----------|------------|
103
- | Frontend | Gradio 4.x |
104
- | LLM | Groq API (Llama 3.3 70B) |
105
- | Transcript | youtube-transcript-api |
106
- | Documents | python-docx, reportlab |
107
-
108
- ---
109
-
110
- ## Files in This Space
111
-
112
- ```
113
- β”œβ”€β”€ Dockerfile # Docker configuration
114
- β”œβ”€β”€ README.md # This file
115
- β”œβ”€β”€ requirements.txt # Python dependencies
116
- β”œβ”€β”€ app.py # Main Gradio application
117
- β”œβ”€β”€ config.py # Configuration
118
- β”œβ”€β”€ groq_client.py # Groq API client
119
- β”œβ”€β”€ summarizer.py # Summarization logic
120
- β”œβ”€β”€ youtube_transcript.py # Transcript extraction
121
- β”œβ”€β”€ youtube_summary.md # LLM prompt template
122
- └── utils/
123
- β”œβ”€β”€ __init__.py
124
- └── statistics.py # Statistics utilities
125
- ```
126
-
127
- ---
128
-
129
- ## License
130
-
131
- MIT License - Feel free to use and modify!
132
 
133
  ---
134
 
 
16
 
17
  ---
18
 
19
+ ## ⚠️ Important: Use Manual Transcript Tab
20
 
21
+ **Hugging Face Spaces blocks YouTube access.** The YouTube URL tab will NOT work.
22
+
23
+ ### How to Use This App:
24
+
25
+ 1. **Open YouTube video** in another tab
26
+ 2. **Click "Show transcript"** button below the video
27
+ 3. **Copy the transcript text**
28
+ 4. **Go to "πŸ“ Manual Transcript" tab** in this app
29
+ 5. **Paste the transcript** and click "Generate Summary"
30
 
31
  ---
32
 
33
+ ## Step-by-Step Guide
34
+
35
+ ### Step 1: Get Transcript from YouTube
36
+
37
+ 1. Open any YouTube video (e.g., https://www.youtube.com/watch?v=example)
38
+ 2. Click the **"..." (more)** button below the video
39
+ 3. Click **"Show transcript"**
40
+ 4. Click anywhere in the transcript box
41
+ 5. Press **Ctrl+A** to select all
42
+ 6. Press **Ctrl+C** to copy
43
 
44
+ ### Step 2: Generate Summary
 
 
 
 
45
 
46
+ 1. In this app, go to **"πŸ“ Manual Transcript"** tab
47
+ 2. **Paste** the transcript (Ctrl+V)
48
+ 3. Add **video title** (optional)
49
+ 4. Add **video duration** like `10:30` (optional)
 
50
  5. Click **"πŸš€ Generate Summary from Transcript"**
51
 
52
+ ### Step 3: Download Results
53
+
54
+ - **πŸ“„ PDF** - Formatted book-style summary
55
+ - **πŸ“ Word** - Editable document
56
+ - **πŸ“‹ Markdown** - For note-taking apps
57
+ - **πŸ“œ Transcript** - Original text
58
+
59
  ---
60
 
61
  ## Required Setup (One-Time)
62
 
63
+ ### Get Groq API Key (FREE)
64
 
65
  1. Visit [console.groq.com](https://console.groq.com/)
66
  2. Sign up for **FREE** account
67
+ 3. Click **"API Keys"** β†’ **"Create API Key"**
68
+ 4. Copy the key (starts with `gsk_`)
 
69
 
70
+ ### Add to Space Secrets
71
 
72
+ 1. Go to [Space Settings](https://huggingface.co/spaces/simplytaps/Youtube-sum/settings)
73
  2. Scroll to **"Repository Secrets"**
74
+ 3. Add secret:
 
75
  - **Name**: `GROQ_API_KEY`
76
+ - **Value**: Your API key
77
+ 4. Click **"Add Secret"**
78
+ 5. **Restart** the Space
79
 
80
  ---
81
 
82
  ## Output Structure
83
 
 
 
84
  | Section | Description |
85
  |---------|-------------|
86
+ | Executive Overview | High-level summary |
87
+ | Introduction | Background and context |
88
+ | Chapter-by-Chapter | Detailed breakdown |
89
+ | Key Concepts | Important terms |
90
+ | Key Takeaways | Main insights |
91
+ | Memorable Quotations | Notable quotes |
92
+ | Practical Applications | How to apply |
93
+ | Critical Analysis | Strengths/limitations |
94
+ | Quick Summary | TL;DR bullets |
95
 
96
  ---
97
 
 
99
 
100
  | Problem | Solution |
101
  |---------|----------|
102
+ | "YouTube URL not working" | Use Manual Transcript tab instead |
103
+ | "API key error" | Add GROQ_API_KEY to secrets |
104
+ | "Rate limit exceeded" | Get your own API key |
105
+ | App not loading | Wait 1-2 minutes for startup |
106
 
107
  ---
108
 
109
  ## Technical Stack
110
 
111
+ - **Frontend**: Gradio 4.x
112
+ - **LLM**: Groq API (Llama 3.3 70B)
113
+ - **Documents**: python-docx, reportlab
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
 
115
  ---
116