title | emoji | colorFrom | colorTo | sdk | sdk_version | app_file | pinned |
---|---|---|---|---|---|---|---|
Chat PDF |
📋 |
purple |
green |
streamlit |
1.35.0 |
app.py |
false |
This is a RAG(Retrieval Augmented Generation) project that allows users to upload PDF files, extract text from them, and then ask questions about the content of the PDFs. The application uses the Gemini model from Google Generative AI to generate responses to user questions. Check this out here: https://salahin-chat-pdf.hf.space/
- Upload multiple PDF files
- Extract text from PDF files
- Split text into chunks for efficient processing
- Create a vector store from text chunks using FAISS
- Use a conversational chain to generate responses to user questions
- Display conversation history
- Upload one or more PDF files using the file uploader in the sidebar.
- Click the "Submit" button to process the PDF files.
- Ask a question about the content of the PDF files using the chat input box.
- The application will generate a response to your question and display it in the chat window.
The application uses the following libraries:
streamlit
for the web interfacePyPDF2
for extracting text from PDF filesLangchain
for creating a conversational chainGoogle Generative AI
for generating responses to user questionsFAISS
for creating a vector store from text chunks
The application uses a recursive character text splitter to split text into chunks of 10,000 characters with an overlap of 1,000 characters. The conversational chain uses a prompt template to generate responses to user questions.
To run the application locally, follow these steps:
- Clone the repository using git clone.
https://github.com/MahirSalahin/Chat-PDF.git
- Install the required libraries using
pip install -r requirements.txt.
- Set your GOOGLE_API_KEY in the
.env
file. - Run the application using
streamlit run app.py
This project is licensed under the MIT License.