Git Product home page Git Product logo

multiple_chat_pdf's Introduction

Chat with Multiple PDFs

This project is a Streamlit application that allows users to interact with multiple PDF documents. It uses the Langchain library to provide a conversational interface for asking questions about the contents of the uploaded PDFs.

How it works

The application works in several steps:

  1. PDF Upload: Users can upload one or more PDF documents via the sidebar.
  2. PDF Processing: The text is extracted from each page of each uploaded PDF.
  3. Text Splitting: The raw text from the PDFs is split into chunks using a character-based text splitter from the Langchain library.
  4. Vector Store Creation: A vector store is created from the text chunks using OpenAI embeddings. This vector store is used for retrieving relevant information in response to user queries.
  5. Conversation Chain Creation: A conversation chain is created, which uses a ChatOpenAI model, a FAISS retriever (created from the vector store), and a conversation buffer memory. This conversation chain is used to handle user queries.

Usage

To use the application:

  1. Clone this repository.
  2. Install the required Python packages (listed in requirements.txt).
  3. Run the Streamlit application with streamlit run app.py.
  4. Upload one or more PDFs via the sidebar.
  5. Ask a question about the documents in the main text input field.

Note

This project is an example of how to use the Langchain library for document retrieval. It should be adapted to your specific use case and requirements.

multiple_chat_pdf's People

Contributors

abhishekjindal1997 avatar

Watchers

 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.