A simple Python-based AI file summarizer that reads different file types and generates concise summaries using locally running LLMs through Ollama.
This project works completely offline after setup and supports multiple AI models such as Llama 3.2, Gemma, and TinyLlama.
- Read and summarize multiple file types
- Uses local AI models with Ollama
- Offline & privacy-friendly
- Fast summarization
- Option to save summaries
- Supports multiple models:
- llama3.2
- gemma3
- tinyllama
git clone https://github.com/IndiraV5/Summar.io
cd local-file-summarizerpython -m venv venv
venv\Scripts\activatepython3 -m venv venv
source venv/bin/activatepip install requests PyPDF2 python-docxOr create a requirements.txt:
requests
PyPDF2
python-docxThen run:
pip install -r requirements.txtDownload and install Ollama from:
Run these commands:
ollama pull llama3.2
ollama pull gemma3
ollama pull tinyllamaStart the Ollama server:
ollama servepython summarizer.py============================================================
LOCAL FILE SUMMARIZER WITH OLLAMA
============================================================
📁 Enter file path:
sample.pdf
Available models:
1. llama3.2
2. gemma3
3. tinyllama
Choose model:
1- User selects a file
- Python reads the file content
- Content is sent to Ollama API
- Local LLM generates summary
- Summary is displayed and optionally saved
- Python
- Ollama
- Llama 3.2 / Gemma / TinyLlama
- PyPDF2
- python-docx
- Requests
Developed by Indira Verma