PDF-QueryBOT is a full-stack application designed to allow users to upload PDF documents and interact with them through natural language processing. Users can ask questions regarding the content of the uploaded PDFs, and the backend processes these documents to provide answers.
The application is built using a microservices architecture, with the following components:
- Frontend: Developed with React.js, providing a user interface for document upload and interaction.
- Backend: Built with FastAPI, handling PDF uploads, question processing, and answer retrieval.
- NLP Processing: Utilizes LangChain for processing natural language questions and generating answers from PDF content.
- Clone the repository:
git clone https://github.com/suhailskhan9/PDF-QueryBOT.git cd PDF-QueryBOT
- Install dependencies:
- For the backend (inside the backend directory):
pip install -r requirements.txt
- For the frontend (inside the frontend directory):
npm install
- Start the backend server:
uvicorn main:app --reload
- Start the frontend application:
npm start
Uploads PDF files, extracts text, splits it into chunks, and stores vector embeddings for retrieval.
POST /upload
- Content-Type:
multipart/form-data
- Body Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
files |
List[UploadFile] |
✅ Yes | List of PDF files to upload |
- Success (200 OK)
{ "message": "PDFs uploaded and processed successfully" }
Queries the stored PDFs for an answer based on stored embeddings.
POST /ask
- Content-Type:
application/json
- Body Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
question |
str |
✅ Yes | The question to ask based on uploaded PDFs |
- Success (200 OK)
{ "answer": "Summarized response from the PDFs" }