Automatically summarize PDF documents using Ollama and LangChain.
- Ollama
- llama3.2 or another model (es. gemma3:1b, etc..)
- nomic-embed-text for rag.py
- python-tk
- Install dependencies:
pip install -r requirements.txt- Ensure Ollama is running with the llama3.2 model:
ollama servepython ui.pypython rag/main.pypython ui.py
python summarizer.pypython summarizer.py /path/to/pdf/folderpython summarizer.py ./papers
python summarizer.py "C:\Users\<YourName>\Documents\PDFs"
python summarizer.py ../research_papersThe script will:
- Create the folder if it doesn't exist
- Process all PDF files in the specified folder
- Generate a concise summary for each PDF using the local llama3.2 model