Waris01/Multi-Model-Pdf-Chat
0
๐ Multi-Modal RAG PDF Chatbot
A Streamlit application that allows you to upload a PDF, ask questions about its content, and get accurate responses using a Multi-Modal Retrieval-Augmented Generation (RAG) pipeline powered by Groq's Gemma-2 9B model.
๐ Features
- ๐ Upload any PDF
- ๐ Intelligent chunking and embedding
- ๐ง Ask natural language questions about your PDF
- โก Powered by FAISS + HuggingFace + Groq LLM
- ๐ง Caches session so PDF isn't reprocessed on every query
๐ ๏ธ Installation (with venv)
- Clone the repo:
git clone https://github.com/Warishayat/Multimodel-Rag-Application01.git
cd Multimodal-Rag-Application01- Create and activate a virtual environment:
python -m venv venv
# Activate:
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Set up your `.env` file:
Create a .env file in the root directory:
GROQ_API_KEY=your_groq_api_key_here๐ฆ Project Structure
๐ Multimodal-Rag-Application01
โโโ main.py # Streamlit frontend
โโโ pdfparsing.py # PDF parser using pymupdf4llm
โโโ Datapreprocessing.py # Chunking & text cleaning
โโโ vectorstore.py # Embedding & FAISS logic
โโโ .env # API keys
โโโ requirements.txt # Python dependencies
โโโ README.md # You're here!โถ๏ธ Run the App
streamlit run main.pyThen open http://localhost:8501 in your browser.
๐งช Example Queries
After uploading a PDF, try asking:
- "What is the summary of section 3?"
- "List all benchmarks mentioned."
- "How is this model different from others?"
๐ก Tips
- PDF is processed only once per session using
st.session_state. - Uses
RecursiveCharacterTextSplitterfor effective chunking. - Embedding with
HuggingFaceEmbeddings.
๐ Requirements
Make sure your requirements.txt includes at least:
streamlit
python-dotenv
langchain
langchain-community
langchain-groq
faiss-cpu
pymupdf4llm๐ฌ Credits
Built with โค๏ธ by Waris Hayat Abbasi.
