A Streamlit application for asking questions about PDF documents using local AI models via Ollama.
-
Install Ollama:
- Download from https://ollama.ai/download
- Install and run Ollama
-
Pull a model (in terminal):
ollama pull llama3.2
Or try other models:
mistral,llama3,phi3, etc. -
Start Ollama server (if not auto-started):
ollama serve
-
Set up Python environment:
python -m venv .venv .venv\Scripts\activate # Windows pip install -r requirements.txt
-
Optional: Configure model: Create a
.envfile with:OLLAMA_MODEL=llama3.2 # or your preferred model -
Run the app:
streamlit run main.py
- Upload PDF files
- Extract text from PDFs
- Ask questions about the document content
- AI-powered answers using local Ollama models (no API key required)
- Document storage with automatic expiration (1 hour)
- Only PDF files are supported
- Documents are stored in memory and expire after 1 hour
- Answers are based only on the extracted text from the PDF
- Requires Ollama to be running locally
- No internet connection needed for AI inference (after model download)