How devvirani13/docbot-chatbot-based-document-assistance-system- works
Main Components
• Client Interface: Represent the user’s interaction with the system (e.g., browser or API client). This is where users upload PDF files and send questions.
• Flask Web Server: This is the central application (app.py) that handles incoming HTTP requests (like /upload and /ask_question endpoints), orchestrates the PDF processing, and responds to client queries.
• PDF Upload & File Storage: Include components to represent the “uploads” directory (for the raw PDFs) and “uploadimages” (for the images extracted from PDFs).
• PDF Processing Pipeline:
• PDF Text Extraction Module: Using libraries such as pdfminer, PyPDF2, and pdfplumber to extract text.
• PDF-to-Image Conversion: Handling the conversion of PDF pages to images (using pdf2image).
• NLP & Question Answering Engine:
• Use LangChain and HuggingFace to process the extracted content.
• Integration with Google Generative AI for enhanced Q&A.
• A visual representation of the knowledge (e.g., a Chroma vector store depicted as the “db_text” directory) that stores processed text data for rapid querying.
Relationships and Data Flow
• From the Flask server, illustrate two parallel processing pipelines:
• One for direct PDF text extraction.
• Another for converting PDF pages to images followed by YOLO (for image detection) and then EasyOCR (for OCR).
• Converge these outputs into a data aggregation module that indexes content into the Chroma vector store (“db_text”).
• Finally, indicate the returning flow where the Flask server sends back results to the client.
Additional Technical Details
• Two main API endpoints: “/upload” for file submissions and “/ask_question” for querying the processed data.
• That the system separates concerns (PDF processing, image analysis, and NLP-based question answering) which is an architecturally clean design.