Skip to content

Manasoak/Documate-Ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DocuMate AI (documate)

A smart PDF processing tool designed to extract text, generate intelligent summaries using a local AI model (Ollama), and deliver them instantly via WhatsApp and a formatted Word document.

πŸš€ Features

  • PDF Text Extraction: Uses pdfplumber to extract content page-by-page.
  • Local AI Processing: Integrates with Ollama (llama3.2 by default) for high-quality, privacy-focused summaries.
  • Docx Export: Automatically formats the AI-generated summaries into a clean Word document.
  • WhatsApp Alerts: Sends live page-by-page summaries to your WhatsApp number using pywhatkit.
  • Customizable: Control the model, prompt, and layout settings with a few tweaks in main.py.

πŸ›  Prerequisites

  1. Python 3.8+
  2. Ollama: Install and run Ollama locally from ollama.com.
    • Pull the model: ollama pull llama3.2
  3. WhatsApp Web: Ensure your default browser is logged into WhatsApp Web for the automated messaging feature.

πŸ“¦ Installation

  1. Create and Activate a Virtual Environment:

    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  2. Install Core Dependencies:

    pip install pdfplumber python-docx requests ollama pywhatkit
  3. Install Google API Client (Optional): If you plan to sync with Google Docs:

    pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib

πŸ–₯ Usage

  1. Prepare your PDF: Place your document in the project root and name it input.pdf (or update PDF_PATH in main.py).
  2. Set WhatsApp Number: Update WHATSAPP_NUMBER and SEND_TO_WHATSAPP in main.py.
  3. Run the Script:
    python main.py

The script will process each page, send a message to WhatsApp (if enabled), and save the final compilation to output.docx.

βš™οΈ Configuration

  • MODEL_NAME: Change the LLM (default llama3.2).
  • PROMPT: Define what information you want extracted (Summary, Key Points, etc.).
  • DOC_TITLE: Change the title of the generated Word document.
  • FONT_NAME / FONT_SIZE: Change docx formatting.

About

Created this mini-project to learn how to set up and integrate Ollama on a local machine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages