DocChatAI is an advanced streamlit based web application that leverages Retrieval-Augmented Generation (RAG) to deliver intelligent, context-aware responses to user queries based on the content of uploaded PDF documents.
- Document Upload: Users have the option to upload PDF documents which the app will utilize as additional context for generating answers.
- Chat Interface: Ask questions and receive contexually relevant & accurate answers, with insights pulled directly from the uploaded PDFs.
- Download Conversation: Before resetting the session, users can download a PDF of the conversation, including all interactions and responses generated from the uploaded documents. This feature ensures that users can retain a complete record of the session's context for future reference.
- Reset Button: This feature clears the chat history and removes all uploaded documents from backend storage. To start a new session, users will need to re-upload the documents.
These instructions will walk you through the process of setting up DocChatAI on your local machine for development and testing.
- Set up project directory
- Install python 3.8 or higher (Used 3.10.9)
- Clone the repository:
git clone https://github.com/yourusername/DocChatAI.git
- Navigate to the project directory:
cd DocChatAI
- Install necessary dependencies:
pip install -r requirements.txt
- Create a virtual environment to isolate dependencies for your project. For Windows:
python -m venv venv .\venv\Scripts\activate
- Create a "config.toml" file to configure global settings for Streamlit app, including parameters such as the application theme, server port, and other essential options.
- Run the Streamlit app:
streamlit run app.py
- Build the docker image:
docker build -t project-image .
- Run the docker container:
docker run -d -p 8501:8501 --name project-container project-image
Note: If requirements.txt doesn't have all the dependencies installed before making the docker image, use the following command to put all dependencies from the virtual environment to requirements.txt
pip freeze > requirements.txt