Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 

Repository files navigation

πŸ“„ Doc-Fusion

Doc-Fusion is a robust, intelligent application that transforms collections of academic or technical PDFs into semantically searchable and structured outputsβ€”including LaTeX-based review papersβ€”with minimal effort. Powered by LlamaParse, Google Gemini, and Milvus, Doc-Fusion extracts, summarizes, and indexes documents into a vector database, enabling natural language querying and automated review generation.


πŸš€ Features

  • πŸ” AI-powered PDF extraction and chunking using LlamaParse
  • πŸ€– Summarization via Google Gemini
  • 🧠 Keyword-driven semantic similarity search
  • πŸ“š Embedding & vector search with Milvus
  • 🧾 Automated LaTeX review paper generation
  • πŸ“„ Compile LaTeX into polished, formatted PDF outputs
  • 🌐 Streamlit web app interface
  • 🐳 Full Docker container support
  • πŸ“‚ Works with multiple PDFs
  • 🧱 Modular architecture for easy scaling and extension

🧠 How It Works

  1. Multi-PDF Ingestion
    Upload multiple PDF documents as raw inputs.

  2. Keyword-Based Similarity Search
    A user-defined keyword query drives a semantic similarity search, extracting the most relevant content from the dataset.

  3. Dynamic LaTeX Generation
    Retrieved content is automatically converted into structured LaTeX snippetsβ€”including sections, figures, citations.

  4. Review Paper PDF Output
    Compiled LaTeX is rendered into a professionally formatted review paper with customized styling.


βš™οΈ Installation Steps

  1. Clone the repository
git clone https://github.com/vidhi-github/doc-fusion.git
cd doc-fusion
  1. Generate API Keys
  1. Create a .env file in the root directory and paste:
LLAMA_CLOUD_API_KEY=your_llama_key
GEMINI_API_KEY=your_gemini_key
  1. Create and activate a virtual environment
python -m venv myenv
myenv\Scripts\activate       # On Windows
  1. Install dependencies
pip install -r requirements.txt
  1. Parse and dump PDFs
python automation.py dump data/cnn1.pdf data/cnn2.pdf output
  1. (Optional) Run with Docker
docker compose up -d
  1. Search using a query
python automation.py search "Convolutional Neural Network"
  1. Launch Streamlit app
streamlit run app.py

πŸ“ Directory Structure

Doc-Fusion/
β”‚
β”œβ”€β”€ automation.py              # Main automation script for dumping/searching PDFs
β”œβ”€β”€ app.py                     # Streamlit app interface
β”œβ”€β”€ requirements.txt           # Python dependencies
β”œβ”€β”€ .env                       # API keys (create manually)
β”‚
β”œβ”€β”€ data/                      # Input PDFs
β”œβ”€β”€ output/                    # JSON summaries
β”œβ”€β”€ myenv/                     # Virtual environment
β”œβ”€β”€ static/                    # Optional LaTeX assets
β”‚
β”œβ”€β”€ Dockerfile                 # Docker configuration
β”œβ”€β”€ docker-compose.yml         # Docker service runner
β”‚
β”œβ”€β”€ parser.py                  # LlamaParse-based PDF parser
β”œβ”€β”€ retrieval.py               # Vector DB handling (Milvus)
β”œβ”€β”€ ToLatex.py                 # LaTeX generator module
β”œβ”€β”€ usegemini.py               # Gemini summarizer
β”œβ”€β”€ llm_prompt.py              # Prompt templates for LLMs
└── README.md                  # You're reading it!

🌍 Applications

  • 🧠 Academic Research: Streamlined review paper generation and literature analysis.
  • πŸ“š Document Management: Ideal for law firms, universities, or corporate knowledge bases.
  • πŸ” AI-Powered PDF Search Engines: Semantically index and search documents using natural queries.
  • πŸ₯ Healthcare & Legal: Summarize case files, reports, or records with AI.
  • πŸ’Ό Enterprise Knowledge Extraction: Convert legacy documentation into structured insights.

πŸ› οΈ Tech Stack

  • Python 3.12
  • LlamaParse (LlamaIndex Cloud)
  • Google Gemini
  • Milvus (Vector DB)
  • PyMuPDF (for layout-preserving parsing)
  • Streamlit
  • Docker

πŸš€ Future Scope

  • πŸ”§ Drag-and-drop GUI for PDF uploads
  • πŸ€– Voice-enabled chatbot for reading summaries aloud
  • 🌐 Multilingual support for translation and search
  • πŸ“„ OCR support for scanned PDFs
  • ☁️ Cloud upload (AWS S3, Firebase, etc.)
  • πŸ“Š Analytics dashboard for document insights
  • 🧩 Plug-in support for other LLMs (GPT-4, Claude, etc.)
  • πŸ“± Cross-platform mobile app
  • 🧠 Fine-tuned models for domain-specific outputs
  • πŸ§ͺ Auto-evaluation of summary quality and key insights

πŸ™Œ Contributing

Pull requests are welcome!
To contribute:

# Fork the repo
git checkout -b feature/your-feature
# Make your changes
# Submit a pull request to the main branch

πŸ“¬ Contact

Built with ❀️ by Vidhi Jindal
Feel free to reach out for collaborations or feedback! Thank You for going throug my project.


About

Doc-Fusion- Automated Summarisation of MultiDocs with PDF and Latex Format.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors