Spaces:
Sleeping
Sleeping
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -16,72 +16,82 @@ Transform any YouTube video into a comprehensive, book-style summary using AI (G
|
|
| 16 |
|
| 17 |
---
|
| 18 |
|
| 19 |
-
##
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
---
|
| 29 |
|
| 30 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
-
###
|
| 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 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 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 |
-
###
|
| 50 |
|
| 51 |
1. Visit [console.groq.com](https://console.groq.com/)
|
| 52 |
2. Sign up for **FREE** account
|
| 53 |
-
3. Click **"API Keys"**
|
| 54 |
-
4.
|
| 55 |
-
5. Copy the key (starts with `gsk_`)
|
| 56 |
|
| 57 |
-
###
|
| 58 |
|
| 59 |
-
1. Go to
|
| 60 |
2. Scroll to **"Repository Secrets"**
|
| 61 |
-
3.
|
| 62 |
-
4. Enter:
|
| 63 |
- **Name**: `GROQ_API_KEY`
|
| 64 |
-
- **Value**: Your API key
|
| 65 |
-
|
| 66 |
-
|
| 67 |
|
| 68 |
---
|
| 69 |
|
| 70 |
## Output Structure
|
| 71 |
|
| 72 |
-
The generated summary includes:
|
| 73 |
-
|
| 74 |
| Section | Description |
|
| 75 |
|---------|-------------|
|
| 76 |
-
|
|
| 77 |
-
|
|
| 78 |
-
|
|
| 79 |
-
|
|
| 80 |
-
|
|
| 81 |
-
|
|
| 82 |
-
|
|
| 83 |
-
|
|
| 84 |
-
|
|
| 85 |
|
| 86 |
---
|
| 87 |
|
|
@@ -89,46 +99,18 @@ The generated summary includes:
|
|
| 89 |
|
| 90 |
| Problem | Solution |
|
| 91 |
|---------|----------|
|
| 92 |
-
| "
|
| 93 |
-
| "
|
| 94 |
-
| "
|
| 95 |
-
| App not loading | Wait 1-2 minutes for
|
| 96 |
|
| 97 |
---
|
| 98 |
|
| 99 |
## Technical Stack
|
| 100 |
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 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 |
|