The Chat With PDF App is a Python application that allows you to chat with a PDF documents. You can ask questions about the PDF 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 PDF.
To install the Chat With PDF App, please follow these steps:
-
Download Ollama library
curl https://ollama.ai/install.sh | sh
-
pull the chat models we will use, in this case we will use LLAMA2, MISTRAL and GEMMA
ollama pull llama2
ollama pull mistral
ollama pull gemma
-
Create new environment with python 3.9 and activate it, in this case we will use conda
conda create -n cwp python=3.9
conda activate cwp
-
Clone the repository to your local machine.
git clone https://github.com/jorge-armando-navarro-flores/chat_with_PDF.git
cd chat_with_PDF
-
Install the required dependencies by running the following command:
pip install -r requirements.txt
To use the Chat With PDF app, follow these steps:
-
Run the
main.py
file using the Streamlit CLI. Execute the following command:python3 main.py
-
The application will launch in your default web browser, displaying the user interface.
-
Load your PDF into the app by following the provided instructions.
-
If you choose OpenAI source you will need to provide your OPENAI_API_KEY. you can get it here
-
Ask questions in natural language about the loaded PDF using the chat interface.