PDFQueryApplication / README.md
sunbal7's picture
Update README.md
42339b0 verified
---
title: πŸ“š RAG-based PDF Query Application
emoji: πŸ“š
colorFrom: purple
colorTo: blue
sdk: streamlit
sdk_version: 1.42.0
app_file: app.py
pinned: false
---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
# πŸ“š RAG-based PDF Query Application
This application leverages Retrieval-Augmented Generation (RAG) to enable users to ask questions about a PDF document. The PDF is processed and split into chunks, which are then indexed and used to find the most relevant information when the user submits a query.
## Features
- Upload a PDF and ask questions based on its contents.
- PDF is processed using **PyMuPDF** and text is split into chunks.
- **FAISS** is used to create an index for quick retrieval of relevant text chunks.
- The application uses the **Groq API** for generating answers based on the retrieved context.
## How it works
1. Upload a PDF document.
2. The application extracts text from the PDF and splits it into smaller chunks.
3. A **FAISS index** is built using embeddings of these chunks.
4. When you submit a query, the system retrieves the most relevant chunks and sends them to the **Groq API** to generate an answer.