# gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app architecture

> Architecture diagram of the GitHub repository gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app
- Repository: https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app

## Overview

This app accepts a YouTube URL, downloads its audio, transcribes it, and summarizes the transcript with a local Llama model; the Streamlit interface also displays the video and result. `summary.py` provides a separate hard-coded command-line run of the same general workflow. The README describes the intended Haystack, Whisper, Llama 2, and Streamlit capabilities. The imported `model_add` module is absent from the supplied tree, so its implementation and wiring cannot be shown.

Main entry points: [`yt_summary.py`](https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/yt_summary.py) (Streamlit UI), [`summary.py`](https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/summary.py) (Scripted run)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_streamlit["Streamlit UI<br/>[yt_summary.py]"]
  node_video_result["Video and summary<br/>[yt_summary.py]"]
end

subgraph group_workflow["Summarization workflow"]
  node_download["Download audio<br/>[yt_summary.py]"]
  node_model_init["Initialize model<br/>[yt_summary.py]"]
  node_prompt_init["Initialize prompt<br/>[yt_summary.py]"]
  node_transcribe["Transcribe pipeline<br/>[yt_summary.py]"]
  node_cli_run["Scripted run<br/>[summary.py]"]
end

subgraph group_models["AI integrations"]
  node_pipeline["Haystack pipeline<br/>[yt_summary.py]"]
  node_whisper["Whisper"]
  node_prompt_node["PromptNode"]
  node_llama["Llama 2 GGUF"]
end

node_user(("User"))
node_youtube["YouTube"]

node_user -->|"enters URL"| node_streamlit
node_streamlit -->|"calls"| node_download
node_download -->|"downloads audio"| node_youtube
node_streamlit -->|"initializes"| node_model_init
node_model_init -.->|"configures model"| node_llama
node_streamlit -->|"initializes"| node_prompt_init
node_prompt_init -->|"creates"| node_prompt_node
node_streamlit -->|"calls"| node_transcribe
node_transcribe -->|"builds and runs"| node_pipeline
node_pipeline -->|"transcribes"| node_whisper
node_pipeline -->|"dispatches transcript"| node_prompt_node
node_prompt_node -.->|"generates summary"| node_llama
node_streamlit -->|"displays video and result"| node_video_result
node_user -.->|"runs script"| node_cli_run
node_cli_run -->|"downloads audio"| node_youtube
node_cli_run -->|"builds and runs"| node_pipeline
node_cli_run -.->|"prints summary"| node_video_result

click node_streamlit "https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/yt_summary.py"
click node_download "https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/yt_summary.py"
click node_model_init "https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/yt_summary.py"
click node_prompt_init "https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/yt_summary.py"
click node_transcribe "https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/yt_summary.py"
click node_pipeline "https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/yt_summary.py"
click node_video_result "https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/yt_summary.py"
click node_cli_run "https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/summary.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_streamlit,node_video_result,node_user toneBlue
class node_download,node_model_init,node_prompt_init,node_transcribe,node_cli_run toneAmber
class node_pipeline,node_whisper,node_prompt_node,node_llama toneMint
class node_youtube toneIndigo
```

## Components

### User interface

- [Streamlit UI](https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/yt_summary.py): `yt_summary.py`
- [Video and summary](https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/yt_summary.py): `yt_summary.py`

### Summarization workflow

- [Download audio](https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/yt_summary.py): `yt_summary.py`
- [Initialize model](https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/yt_summary.py): `yt_summary.py`
- [Initialize prompt](https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/yt_summary.py): `yt_summary.py`
- [Transcribe pipeline](https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/yt_summary.py): `yt_summary.py`
- [Scripted run](https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/summary.py): `summary.py`

### AI integrations

- [Haystack pipeline](https://github.com/gurpreetkaurjethra/youtube-video-transcribe-summarizer-llm-app/blob/main/yt_summary.py): `yt_summary.py`
- **Whisper**
- **PromptNode**
- **Llama 2 GGUF**

### Other components

- **User**
- **YouTube**

## Connections

- User → Streamlit UI: enters URL
- Streamlit UI → Download audio: calls
- Download audio → YouTube: downloads audio
- Streamlit UI → Initialize model: initializes
- Initialize model → Llama 2 GGUF: configures model
- Streamlit UI → Initialize prompt: initializes
- Initialize prompt → PromptNode: creates
- Streamlit UI → Transcribe pipeline: calls
- Transcribe pipeline → Haystack pipeline: builds and runs
- Haystack pipeline → Whisper: transcribes
- Haystack pipeline → PromptNode: dispatches transcript
- PromptNode → Llama 2 GGUF: generates summary
- Streamlit UI → Video and summary: displays video and result
- User → Scripted run: runs script
- Scripted run → YouTube: downloads audio
- Scripted run → Haystack pipeline: builds and runs
- Scripted run → Video and summary: prints summary
