This is the Gemini RAG (Retrieval-Augmented Generation) App, which allows users to chat with PDF documents. The app uses Streamlit for the user interface, PyPDF2 for reading PDF files, and Langchain with Google Generative AI for question answering.
- Upload multiple PDF files.
- Extract text from the uploaded PDF files.
- Split the extracted text into manageable chunks.
- Create a vector store using FAISS and Google Generative AI embeddings.
- Answer user questions based on the content of the uploaded PDF files.
To use this application, follow these steps:
-
Clone the repository:
git clone https://github.com/MSimsek07/gemini-rag-app.git cd gemini-rag-app
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Set up the environment variables:
Create a
.env
file in the root directory of the project and add your Google API key:GOOGLE_API_KEY=your_google_api_key_here
-
Run the Streamlit app:
streamlit run app.py
-
Upload PDF files:
- Use the sidebar to upload your PDF files.
- Click on the "Submit & Process" button to process the uploaded PDFs.
-
Ask questions:
- Type your question in the text input field.
- The app will display the answer based on the content of the uploaded PDFs.
If you want to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for more details.
If you have any questions or feedback, please open an issue in the repository or contact the repository owner.
Enjoy using the Gemini RAG App! 🚀