π Welcome to ChatPDF AI Powered Document Interaction! This system is designed to allow users to interact with their PDF documents intuitively and efficiently. Using retrieval-augmented generation (RAG) technology, ChatPDF facilitates querying PDF content, extracting information, summarizing texts, and enhancing document accessibility. Just upload a PDF and start conversing with it using natural language, making information extraction and management easier and faster.
- Project Description
- Project Objectives
- Key Features
- Technologies Used
- Project Structure
- Running the Project
- Future Features
- License
- How to Contribute
- Author and Contact
The main goal of ChatPDF AI Powered Document Interaction is to simplify and optimize interaction with PDF documents, ensuring a personalized and efficient experience. It aims to:
- Facilitate querying the content of user-uploaded PDFs.
- Simplify the extraction and summarization of document information.
- Provide a user-friendly interface to improve the accessibility and usability of PDFs.
- PDF Interaction: ChatPDF guides the user in querying and interacting with PDF document content.
- Dynamic Data Querying: Uses RAG to provide accurate and contextual answers based on PDF content.
- User-Friendly Interface: Designed for a smooth and accessible user experience, making navigation and feature use easy.
- Python: Main programming language.
- LangChain: For conversational logic and natural language processing.
- Hugging Face Embeddings and FAISS: For efficient information storage and retrieval.
- Streamlit: For creating the user interface.
- Groq API and Llama3-70b-8192: For high-performance processing and large-scale language modeling.
- LangSmith (Optional): To track and evaluate conversation quality.
The project is organized as follows:
.streamlit/
: Contains Streamlit configuration files.config/
: Contains configuration files, such as environment variables.data/
: Data and storage files.docs/
: Relevant documentation and user guides.notebooks/
: Jupyter Notebook files for analysis and experiments.prints/
: Application screenshots.scripts/
: Auxiliary scripts for specific tasks.src/
: Application source code.venv/
: Python virtual environment..gitignore
: Git configuration file.LICENSE
: Project license.README_ptbr.md
: README in Portuguese.README.md
: README in English.requirements.txt
: Project dependencies list.setup.bat
: Script to install dependencies and run the chatbot on Windows.setup.sh
: Script to install dependencies and run the chatbot on Linux.
chatpdf-ai-powered-document-interaction/
βββ .streamlit/
βββ config/
β βββ .env
β βββ .env.example
βββ docs/
β βββ commits_pattern_ptbr.md
β βββ commits_pattern.md
βββ notebooks/
β βββ dependecies_list.ipynb
βββ prints/
β βββ chatbot_1.png
β βββ chatbot_2.png
βββ src/
β βββ assets/
β β βββ favicon.ico
β β βββ vertical_logo.png
β βββ static/
β β βββ ai_profile_photo.png
β β βββ human_profile_photo.png
β βββ app.py
β βββ functions.py
β βββ html_templates.py
β βββ models.py
βββ venv/
βββ .gitignore
βββ LICENSE
βββ README_ptbr.md
βββ README.md
βββ requirements.txt
βββ setup.bat
βββ setup.sh
To run the chatbot locally, follow the steps below:
- Clone the repository:
git clone https://github.com/BrunoTanabe/chatpdf-ai-powered-document-interaction.git
- Navigate to the project directory:
cd chatpdf-ai-powered-document-interaction
- Install
pip
andvenv
if not already installed:sudo apt-get update && sudo apt-get install python3-pip python3-venv
- Create a virtual environment:
python3 -m venv venv
- Activate the virtual environment:
source venv/bin/activate
- Install the dependencies:
pip install -r requirements.txt
- Run Streamlit:
python3 -m streamlit run src/app.py
NOTE: Run the above commands in the project's main folder.
Run the setup.sh
script to install dependencies and run the chatbot:
- Clone the repository:
git clone https://github.com/BrunoTanabe/chatpdf-ai-powered-document-interaction.git
- Navigate to the project directory:
cd chatpdf-ai-powered-document-interaction
- Grant execution permission to the script:
chmod +x setup.sh
- Run the script:
./setup.sh
NOTE: Run the above commands in the project's main folder.
To run the chatbot locally, follow the steps below:
- Clone the repository:
git clone https://github.com/BrunoTanabe/chatpdf-ai-powered-document-interaction.git
- Navigate to the project directory:
cd chatpdf-ai-powered-document-interaction
- Install
pip
andvenv
if not already installed:python -m ensurepip --upgrade
- Create a virtual environment:
python -m venv venv
- Activate the virtual environment:
venv\Scripts\activate
- Install the dependencies:
pip install -r requirements.txt
- Run Streamlit:
python -m streamlit run src/app.py
NOTE: Run the above commands in the project's main folder.
Run the setup.bat
script to install dependencies and run the chatbot:
- Clone the repository:
git clone https://github.com/BrunoTanabe/chatpdf-ai-powered-document-interaction.git
- Navigate to the project directory:
cd chatpdf-ai-powered-document-interaction
- Run the script:
setup.bat
NOTE: Run the above commands in the project's main folder.
- Currently, the variable that receives the response from the LLM receives the message chunk by chunk, but it only displays the response when it's complete. To improve the user experience, it would be interesting to display the response chunk by chunk.
- Currently, the user can send a new message while the model is still responding to the previous request, which usually breaks the application. It would be beneficial to implement a mechanism that prevents the user from sending a new message while the model is still responding to the previous request.
- The app runs on
localhost:8501
, but you can change the port in the.streamlit/config.toml
file.
Distributed under the MIT license. See LICENSE
for more information.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the project
- Create your Feature Branch (
git checkout -b feature/NewFeature
) - Commit your changes (
git commit -m 'Add some NewFeature'
) - Push to the Branch (
git push origin feature/NewFeature
) - Open a Pull Request
Hope you enjoy using ChatPDF! For any questions or suggestions, feel free to get in touch. π