Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

PDF Assistant Demo

A Streamlit-based AI assistant that:

  • Reads and processes PDF documents.
  • Stores document chunks in a Chroma vector database.
  • Uses NoSQL-style metadata for document context.
  • Embeds and retrieves relevant content to answer user questions.

This project demonstrates:

  • Vector embeddings with nomic-embed-text
  • Chroma vector database for semantic search
  • NoSQL-style metadata handling
  • PDF ingestion, text splitting, and contextual retrieval

Features

  • Upload one or more PDFs.
  • Get AI-generated answers that include:
    • Red Flags / Risks
    • Positive Aspects
    • Recommendations
  • View retrieved document chunks for transparency.
  • Persistent local vector DB so embeddings aren't recalculated unnecessarily.

Requirements

  • Python 3.10+
  • Ollama installed and running locally.
  • The following Ollama models available:
    • llama3.2
    • nomic-embed-text

Installation

  1. Clone the repository

    git clone https://github.com/Bredicus/pdf-assistant-demo.git
    cd pdf-assistant-demo
  2. Create and activate a virtual environment

    python -m venv venv
  3. Install dependencies

    pip install -r requirements.txt
  4. Ensure Ollama is running

    ollama serve
  5. Pull required models

    ollama pull llama3.2
    ollama pull nomic-embed-text

Running the App

streamlit run app.py

The app will open in your browser at http://localhost:8501.


Project Structure

pdf-assistant-demo/
│
├── app.py              # Main Streamlit application
├── requirements.txt    # Python dependencies
├── README.md           # Project documentation
└── chroma_db/          # Persistent Chroma vector database (auto-created)

Example Workflow

  1. Upload one or more PDF files.
  2. The app extracts text, splits it into chunks, and stores embeddings in Chroma.
  3. Ask a question about the content.
  4. The assistant retrieves relevant chunks and provides a structured answer:
    • Risks
    • Positives
    • Recommendations

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages