File size: 2,449 Bytes
26b8cf3
 
 
 
 
 
 
 
 
 
 
47d0b30
26b8cf3
d481f2d
f66f244
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26b8cf3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
title: Pdfsense
emoji: πŸ“œ
colorFrom: red
colorTo: red
sdk: streamlit
sdk_version: 1.40.2
app_file: app.py
pinned: false
license: apache-2.0
short_description: PDF Answering Assistant
---

Check out the configuration reference at [Hugging Face Spaces Config](https://huggingface.co/docs/hub/spaces-config-reference).         
# πŸ“œ PDFSense : PDF Question Answering Assistant with Chat History           

PDFSense is an LLM-powered Streamlit application that enables users to upload PDFs and ask questions based on the document's content. It uses a Retrieval-Augmented Generation (RAG) approach to provide accurate, context-aware answers by incorporating previous chat history of the current session.               

[App in Hugging Face Space](https://huggingface.co/spaces/AkashVD26/pdfsense)

## πŸš€ Features
- Upload and analyze PDF documents.
- Ask questions about the uploaded PDF in natural language.
- Retrieve answers using LangChain, FAISS indexing, and Hugging Face embeddings.
- Maintain conversation context for coherent responses.    

## πŸ“š How It Works
- Upload PDF: Drag and drop your PDF file into the uploader.
- Ask Questions: Type a question about the PDF's content.
- Contextual Answers: PDFSense retrieves answers using FAISS and LLMs while maintaining chat history for context.

## πŸ› οΈ Technologies Used         
- Streamlit: Interactive web application framework.
- LangChain: Framework for creating LLM-based applications.
- FAISS: Vector search for efficient retrieval.
- Hugging Face: Pretrained embeddings for document processing.
- Groq: LLM used for generating responses.
- PyPDFLoader: Document loader for processing PDFs.             

## 🧩 Prerequisites
Make sure you have the following prerequisites:

- [Python 3.8 and above](https://www.python.org)
- [Hugging Face account](https://huggingface.co)
- [Hugging Face Access Token](https://huggingface.co/settings/tokens)
- [Groq API key](https://console.groq.com/keys)

## πŸ“¦ Installation
If you want to use this locally on your system:

```
git clone https://github.com/Akashvarma26/PDFSense.git
```

```
pip install -r requirements.txt
```

## ▢️ Usage
Run the Streamlit app locally:
```
streamlit run app.py
```

## πŸ™‹β€β™‚οΈ Acknowledgments
- [LangChain](https://www.langchain.com)
- [Hugging Face](https://huggingface.co)
- [FAISS](https://ai.meta.com/tools/faiss/)
- [Groq](https://groq.com)
- [streamlit](https://www.langchain.com)