File size: 3,351 Bytes
15e45f5
 
012a960
 
 
 
6b5b787
15e45f5
 
96b5cc3
 
 
 
 
 
 
 
 
4975911
 
 
 
 
 
 
96b5cc3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f6c0013
96b5cc3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
---
title: SnapSummaryAI
emoji: πŸš€
colorFrom: blue
colorTo: purple
sdk: docker
app_file: app.py
pinned: false
---


# SnapSummaryAI – YouTube & Web Summarizer πŸš€

SnapSummaryAI is a lightweight Generative AI-powered summarization app that extracts and summarizes content from YouTube videos and web URLs into concise, readable summaries using Groq LLMs and LangChain.  
Built with Streamlit, it is designed for fast inference, clean UX, and easy deployment on Hugging Face Spaces.

---

## πŸš€ Live Demo

Try the app here:  
πŸ‘‰ **https://huggingface.co/spaces/viki77/SnapSummaryAI**

---

## ✨ Features

- URL-based summarization  
  - YouTube videos (non-private, non-shorts)  
  - Articles and general web pages  
- Fast inference using Groq-hosted LLMs  
- Context-aware summaries (up to 300 words)  
- Clean Streamlit user interface  
- Secure API key handling (user-provided, not hardcoded)  
- Hugging Face Spaces compatible  

---

## πŸ› οΈ Tech Stack

- Python  
- Streamlit – UI framework  
- LangChain – LLM orchestration  
- Groq LLMs – High-performance inference  
- YoutubeLoader & UnstructuredURLLoader – Content ingestion  

---

## πŸ“‚ Project Structure

SnapSummaryAI-GenAI
β”‚  
β”œβ”€β”€ app.py                Main Streamlit application  
β”œβ”€β”€ requirements.txt      Project dependencies  
β”œβ”€β”€ README.md             Project documentation  
└── .gitignore            Ignored files (env, venv, cache)  

---

## πŸš€ How It Works

1. The user provides:
   - A Groq API key
   - A YouTube or website URL
2. The application:
   - Validates inputs
   - Loads content using the appropriate loader
   - Sends extracted text to a Groq-hosted LLM via LangChain
3. A concise AI-generated summary is displayed in the UI

---

## ▢️ Running Locally

Clone the repository  
git clone https://github.com/vikrant-honbute/SnapSummaryAI-GenAI.git  
cd SnapSummaryAI-GenAI  

Create a virtual environment (recommended)  
python -m venv venv  
source venv/bin/activate   (macOS/Linux)  
venv\Scripts\activate      (Windows)  

Install dependencies  
pip install -r requirements.txt  

Run the application  
streamlit run app.py  

---

## πŸ”‘ API Key Handling

- The Groq API key is entered via the Streamlit sidebar  
- The key is not stored, not logged, and not committed  
- Safe for local use, public demos, and Hugging Face Spaces  

---

## 🌐 Deployment (Hugging Face Spaces)

SnapSummaryAI is fully compatible with Hugging Face Spaces.

Deployment steps:
1. Create a new Space and select Streamlit
2. Connect this GitHub repository
3. Ensure app.py and requirements.txt are present
4. Launch the Space

Users can securely provide their own Groq API key from the UI.

---

## ⚠️ Limitations

- Does not support:
  - Private or restricted YouTube videos
  - Extremely large web pages without preprocessing
- Summary length is currently fixed

---

## πŸ“Œ Future Improvements

- Streaming summaries (token-by-token)
- Chapter-wise summaries for long videos
- Multi-language summarization
- Chat-style conversational memory
- UI theming and dark mode

---

## πŸ‘¨β€πŸ’» Author

Vikrant Honbute  
AI / ML Engineer | GenAI & LLM Applications  
GitHub: https://github.com/vikrant-honbute  

---

## πŸ“œ License

This project is open-source and intended for educational and demonstration purposes.