File size: 2,138 Bytes
1fdbb46
 
 
 
 
 
 
 
 
b568b77
 
1fdbb46
 
cc4b72f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1fdbb46
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
---
title: Tool YoutubeTranscript
emoji: 🐨
colorFrom: yellow
colorTo: pink
sdk: gradio
sdk_version: 5.10.0
app_file: app.py
pinned: false
tags:
- tool
---

# YouTube Transcript Summarizer and Blog Content Generator

This tool extracts transcripts from YouTube videos, summarizes them using Google's Gemini AI, generates relevant images using Hugging Face models, and creates a formatted DOCX document with the content.

## Features

- Extract transcripts from YouTube videos with automatic language detection
- Summarize transcripts using Google's Gemini AI models
- Generate relevant images based on the summary content
- Create or update DOCX documents with the transcript, summary, and images
- Support for multiple languages (summarizes in the same language as the transcript)
- Configurable AI models and API keys directly from the UI

## Setup and Usage

1. **API Keys**:
   - **Hugging Face API Key**: Required for image generation
   - **Gemini API Key**: Required for transcript summarization
   - Both keys can be entered directly in the UI

2. **Model Configuration**:
   - Select from different Gemini models:
     - gemini-2.0-flash (default)
     - gemini-1.5-pro
     - gemini-1.5-flash

3. **Input**:
   - Enter a YouTube video URL
   - Optionally provide an existing DOCX file to update

4. **Output**:
   - Extracted transcript
   - Generated summary
   - Generated image
   - DOCX document with all content

## Environment Variables

You can optionally set API keys in a `.env` file:

```
HF_API_KEY=your_hugging_face_api_key
GEMINI_API_KEY=your_gemini_api_key
```

## Requirements

- Python 3.8+
- Required packages are listed in `requirements.txt`

## Installation

```bash
# Clone the repository
git clone https://github.com/yourusername/tool-YoutubeTranscript-blog.git
cd tool-YoutubeTranscript-blog

# Create a virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run the application
python app.py
```

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference