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