Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: streamlit
|
7 |
sdk_version: 1.42.0
|
8 |
app_file: app.py
|
@@ -10,3 +10,30 @@ pinned: false
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
title: π RAG-based PDF Query Application
|
3 |
+
emoji: π
|
4 |
+
colorFrom: purple
|
5 |
+
colorTo: blue
|
6 |
sdk: streamlit
|
7 |
sdk_version: 1.42.0
|
8 |
app_file: app.py
|
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
13 |
+
|
14 |
+
# π RAG-based PDF Query Application
|
15 |
+
|
16 |
+
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.
|
17 |
+
|
18 |
+
## Features
|
19 |
+
|
20 |
+
- Upload a PDF and ask questions based on its contents.
|
21 |
+
- PDF is processed using **PyMuPDF** and text is split into chunks.
|
22 |
+
- **FAISS** is used to create an index for quick retrieval of relevant text chunks.
|
23 |
+
- The application uses the **Groq API** for generating answers based on the retrieved context.
|
24 |
+
|
25 |
+
## How it works
|
26 |
+
|
27 |
+
1. Upload a PDF document.
|
28 |
+
2. The application extracts text from the PDF and splits it into smaller chunks.
|
29 |
+
3. A **FAISS index** is built using embeddings of these chunks.
|
30 |
+
4. When you submit a query, the system retrieves the most relevant chunks and sends them to the **Groq API** to generate an answer.
|
31 |
+
|
32 |
+
## Installation
|
33 |
+
|
34 |
+
Clone the repository and install the required dependencies:
|
35 |
+
|
36 |
+
```bash
|
37 |
+
git clone https://huggingface.co/spaces/your-username/your-app-name
|
38 |
+
cd your-app-name
|
39 |
+
pip install -r requirements.txt
|