ChatPDF is a Streamlit application that allows users to upload PDF documents and interactively ask questions about the content. It utilizes advanced NLP models to provide relevant answers based on the ingested documents.
- Upload and ingest PDF documents.
- Chat with an AI assistant based on the content of the PDFs.
- User-friendly interface with real-time interactions.
To run the ChatPDF application, you need the following dependencies. They are listed in requirements.txt
, but here are the key ones:
streamlit
langchain
langchain-community
chatollama
chromadb
huggingface-hub
retrying
- Other libraries as listed in
requirements.txt
.
Follow these steps to set up the project:
-
Clone the repository:
git clone https://github.com/Vignesh02cse/Code-llama.git cd Code-llama
-
Create a virtual environment (optional but recommended):
python -m venv venv source ./.venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
Install the dependencies listed in
requirements.txt
:pip install -r requirements.txt
-
Install Ollama:
To install the Ollama model, follow the instructions specific to your platform:
-
For macOS:
brew tap ollama/tap brew install ollama
-
For Linux:
You can use the official installation script:
curl -sSfL https://ollama.com/download | sh
-
For Windows:
Download the installer from the Ollama website and follow the instructions.
-
-
Run the application:
After installing the dependencies, you can run the Streamlit application with the following command:
streamlit run Main.py
-
Access the application:
Open your web browser and go to
http://localhost:8501
to access the ChatPDF application.
- Upload a PDF document: Click on the "Upload a document" button and select your PDF file.
- Ask questions: Enter your question in the text input field and click "Send" to receive answers based on the document content.
- Chat with the assistant: Continue the conversation by asking follow-up questions.