A simple Retrieval-Augmented Generation (RAG) project using Google Gemini LLM + Streamlit UI.
This app lets you upload PDFs, create embeddings, and ask questions to get intelligent answers.
- 📂 Upload PDF files
- 📝 Extract and process text
- 🧠 Build vector embeddings with FAISS
- 🔍 Ask questions and get answers from Gemini LLM
- 🌐 Easy-to-use Streamlit interface
git clone https://github.com/your-username/RAG_Model_PDF.git
cd RAG_Model_PDF
2️⃣ Setup Environment
python3 -m venv .venv
source .venv/bin/activate # Linux/Mac
.venv\Scripts\activate # Windows
3️⃣ Install Requirements
pip install -r requirements.txt
4️⃣ Configure API Key
Create a .env file in project root:
GOOGLE_API_KEY=your_api_key_here
5️⃣ Run the App
streamlit run app.py
Open 👉 http://localhost:8501
📂 Project Structure
RAG_Model_PDF/
│── app.py # Main Streamlit app
│── requirements.txt # Dependencies
│── README.md # Documentation
│── utils/
│ ├── index_builder.py # FAISS index creation
│ ├── rag_qa_engine.py # RAG QA logic
│── .env # (Your API key here)
│── .venv/ # Virtual environment
🛠️ Requirements
Python 3.11+
Streamlit
LangChain
FAISS
Sentence Transformers
Google Generative AI
📌 Example Usage
Upload sample.pdf
Ask: "What is this document about?"
Get instant answers powered by RAG + Gemini 🚀# RAG_Model_PDF