Giter VIP home page Giter VIP logo

ask-multiple-pdfs's Introduction

MultiPDF Chat App

You can find the tutorial for this project on YouTube.

Introduction


The MultiPDF Chat App is a Python application that allows you to chat with multiple PDF documents. You can ask questions about the PDFs using natural language, and the application will provide relevant responses based on the content of the documents. This app utilizes a language model to generate accurate answers to your queries. Please note that the app will only respond to questions related to the loaded PDFs.

How It Works


MultiPDF Chat App Diagram

The application follows these steps to provide responses to your questions:

  1. PDF Loading: The app reads multiple PDF documents and extracts their text content.

  2. Text Chunking: The extracted text is divided into smaller chunks that can be processed effectively.

  3. Language Model: The application utilizes a language model to generate vector representations (embeddings) of the text chunks.

  4. Similarity Matching: When you ask a question, the app compares it with the text chunks and identifies the most semantically similar ones.

  5. Response Generation: The selected chunks are passed to the language model, which generates a response based on the relevant content of the PDFs.

Dependencies and Installation


To install the MultiPDF Chat App, please follow these steps:

  1. Clone the repository to your local machine.

  2. Install the required dependencies by running the following command:

    pip install -r requirements.txt
    
  3. Obtain an API key from OpenAI and add it to the .env file in the project directory.

Usage


To use the MultiPDF Chat App, follow these steps:

  1. Ensure that you have installed the required dependencies and added the OpenAI API key to the .env file.

  2. Run the main.py file using the Streamlit CLI. Execute the following command:

    streamlit run app.py
    
  3. The application will launch in your default web browser, displaying the user interface.

  4. Load multiple PDF documents into the app by following the provided instructions.

  5. Ask questions in natural language about the loaded PDFs using the chat interface.

Contributing


This repository is intended for educational purposes and does not accept further contributions. It serves as supporting material for a YouTube tutorial that demonstrates how to build this project. Feel free to utilize and enhance the app based on your own requirements.

License


The MultiPDF Chat App is released under the MIT License.

ask-multiple-pdfs's People

Contributors

alejandro-ao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.