DocuMentor is a tool designed to handle document analysis and retrieval with both multi-threaded and sequential processing. The application reads content from multiple PDF files, allowing users to query information either via a high-performance multi-threaded approach or a simpler sequential approach, with both modes delivering responses through a user-friendly web interface.
- Supports multi-threaded document processing for faster response times.
- Simple sequential document processing for resource-constrained scenarios.
- Frontend built with React to provide an intuitive user experience.
- Allows users to switch between threaded and non-threaded modes and view relevant information from the uploaded documents.
- Visual feedback for loading and error handling.
DocuMentor/
├── frontend/
│ ├── node_modules/
│ ├── public/
│ └── src/
│ ├── assets/
│ ├── components/
│ │ ├── Content.jsx
│ │ ├── ResponseContainer.jsx
│ │ ├── Response.jsx
│ │ ├── UserEntry.jsx
│ │ ├── WithoutThread.jsx
│ │ └── WithThread.jsx
│ ├── Context/
│ ├── hooks/
│ │ └── useInfo.js
│ ├── App.jsx
│ ├── index.css
│ └── main.jsx
├── mult/
│ ├── #1.pdf
│ ├── #2.pdf
│ ├── #3.pdf
│ ├── #4.pdf
│ ├── #5.pdf
│ └── #6.pdf
├── seq/
├── .env
├── .gitignore
├── debug.py
├── go.mod
├── LICENSE
├── main.go
├── py1.py
├── py2.py
├── py3.py
├── py4.py
├── py5.py
├── py6.py
├── test2.py
├── README.md
└── vite.config.js
- Go (version 1.16 or later)
- The main Go file (
main.go
) provides backend APIs for handling multi-threaded and sequential document processing. Install Go by following the instructions here.
- The main Go file (
-
Python (version 3.7 or later)
- Install Python packages listed in
requirements.txt
by running:pip install PyMuPDF, Sentence Transformers, scikit-learn, warnings, numpy, spacy
- PyMuPDF (
fitz
): For handling PDF processing.
Each
pyX.py
file in the project is designed to handle a portion of the PDF processing tasks. - Install Python packages listed in
- Node.js (version 14 or later)
- Install dependencies for the React frontend by running:
npm install
- Key dependencies:
- React: Used for building the frontend.
- react-hot-toast: For displaying notifications.
- react-icons: For including icons in the frontend.
- Vite: Bundler used for frontend development and building.
- Install dependencies for the React frontend by running:
-
Clone the Repository:
git clone https://github.com/Niall1985/DocuMentor.git cd DocuMentor
-
Setup Go Backend:
- Navigate to the root directory containing
main.go
. - Run the Go server:
go run main.go
- Navigate to the root directory containing
-
Setup Python Scripts:
- Ensure all Python dependencies are installed:
pip install PyMuPDF, Sentence Transformers, scikit-learn, warnings, numpy, spacy
- Ensure all Python dependencies are installed:
-
Setup Frontend (React):
- Navigate to the
frontend
directory. - Install Node.js dependencies:
npm install
- Start the frontend:
npm run dev
- Navigate to the
-
Starting the Application:
- Run the backend services (Go and Python) as described in the installation steps.
- Start the frontend.
-
Navigating the UI:
- Open your browser and go to
http://localhost:5137
to access the frontend. - Enter your query in the input field.
- View responses in the with threads response container and without threads response container and monitor for loading or error messages.
- Open your browser and go to
-
Environment Variables:
- Configure your
.env
file for any required environment variables.
- Configure your
This project is licensed under the GNU License.