Turn long documents into clear, structured summaries in seconds — powered by Gemini and wrapped in a clean Streamlit UI.
This project is a beginner-friendly AI Document Summarizer that accepts either pasted text or a .txt file upload, then generates a professional, structured summary with:
- Short Summary (3–4 concise lines)
- Detailed Summary (clear explanation)
- Key Points (clean bullet list)
The app uses the Gemini API (model: Gemini 2.5 Flash) and runs locally with Streamlit.
- 📝 Short summary generation
- 📖 Detailed summary generation
- 🔑 Key points extraction
- 📄 .txt file upload support
- 🎛️ Clean, responsive UI (Generate + Clear)
- Python
- Streamlit (UI)
- Gemini API via
google-genai - python-dotenv (loads
.envlocally)
pip install -r requirements.txtstreamlit run app.pyStreamlit will print a local URL in the terminal (commonly http://localhost:8501).
Create a .env file in the project root (this file should stay private):
GEMINI_API_KEY=your_api_key_here
GEMINI_MODEL=gemini-2.5-flashNotes:
- Do not wrap the key in quotes.
- Do not add spaces around
=.
- Open the app in your browser.
- Paste a long text into the input box or upload a
.txtfile. - Click Generate Summary.
- Review the results under:
- 📝 Short Summary
- 📖 Detailed Summary
- 🔑 Key Points
- Support PDFs and DOCX uploads
- Add “Export” options (Markdown / TXT)
- Add token/length controls for tighter summaries
- Improve reliability with stricter output schema (JSON + rendering)
- Add caching for repeated inputs
