• Stars
    star
    1,600
  • Rank 29,247 (Top 0.6 %)
  • Language
    Python
  • Created over 1 year ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Langchain app that allows you to chat with multiple PDFs

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.

OPENAI_API_KEY=your_secrit_api_key

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.

More Repositories

1

langchain-ask-pdf

An AI-app that allows you to upload a PDF and ask questions about it. It uses OpenAI's LLMs to generate a response.
Python
582
star
2

chat-with-websites

Latests Langchain (2024) App to chat with any website given its URL
Python
224
star
3

langchain-ask-csv

A Langchain app that allows you to ask questions to a CSV file
Python
127
star
4

langchain-chat-gui

Langchain chat with memory and a GUI made in Streamlit
Python
79
star
5

chat-with-mysql

GUI Python Application that allows you to chat with a MySQL database
Python
77
star
6

crewai-instagram-example

Example inspired by @joaomdmoura sample project
Python
69
star
7

chatgpt-equations

Chrome extension that allows you to visualize equations using Latex notation inside ChatGPT
JavaScript
57
star
8

crewai-crash-course

Tutorial: Introduction to CrewAI
Python
44
star
9

exa-crewai

HTML
42
star
10

chrome-extension-boilerplate

A boilerplate to create Chrome extensions with Manifest V3
JavaScript
39
star
11

openai-sql-generator

Simple app in React and Node that interacts with OpenAI's ChatGPT API
JavaScript
37
star
12

qdrant-cloud-app

Python
29
star
13

streamlit-cancer-predict

Youtube Tutorial: Streamlit app that predicts Breast Cancer
Python
28
star
14

agents-no-framework

Tutorial on how to create a ReAct agent without a LLM framework
Jupyter Notebook
21
star
15

chagpt-cli-python

A CLI interface that allows you to interact with ChatGPT from your terminal using an API key.
Python
20
star
16

yt-stream-langchain-streamlit

How to stream the generation of a LLM in your Streamlit application
Python
14
star
17

wp-underscores-webpack

WordPress Underscores boilerplate theme with webpack
PHP
9
star
18

chatbot-from-scratch

Python
9
star
19

py-ecommerce-spending-predictions

This model uses linear regression to predict how much a user spends every year in an e-commerce website based on the user's characteristics.
Jupyter Notebook
7
star
20

py-bank-stocks-eda

This project explores the behaviour of 4 major US bank stocks between 2006 and 2020.
Jupyter Notebook
5
star
21

20240223-chat-with-mysql

Tutorial on how to use MySQL loader with LangChain
Jupyter Notebook
5
star
22

tbs-msc-projects

HTML
3
star
23

wp-tutorial-html-to-theme

Finished project from tutorial on Youtube
SCSS
3
star
24

alejandro-ao

3
star
25

py-ad-performance-predictor

This model uses logistic regression to predict whether or not an internet user will click on an ad.
Jupyter Notebook
3
star
26

py-movie-recommendation

This code uses the power of pandas and its correlation functions to get film recommendations to a user based on its ratings on other movies.
Jupyter Notebook
3
star
27

react-todo-list

Front-end of a todo list. Created with react
JavaScript
1
star
28

alejandro-ao.github.io

Coding blog created using HUGO.
HTML
1
star
29

react-leaflet-with-marker-cluster

Created with CodeSandbox
1
star
30

streamlit-cancer

Breast Cancer Diagnosis App
Python
1
star
31

js-tutorial-multistep-form

Created with CodeSandbox
1
star