This is an interactive web application built with Streamlit that allows users to upload one or more PDF files and ask questions about their content using Google's Gemini large language model. It performs document chunking, semantic embedding, and conversational retrieval to give accurate answers based on the uploaded documents.
- Upload multiple PDF files.
- Extract and chunk document text.
- Embed content using
GoogleGenerativeAIEmbeddings(Gemini). - Use a conversational interface powered by Gemini (
ChatGoogleGenerativeAI). - Memory-enabled Q&A for multi-turn conversations.
- Python 3.9
- Streamlit
- Langchain
- Google Generative AI (Gemini)
- FAISS (Vector Store)
- PyPDF2
git clone https://github.com/your-username/inf-retrieval-gemini.git
cd inf-retrieval-geminiconda create -n genai python=3.9
conda activate genaipip install -r requirements.txtGOOGLE_API_KEY=your_google_genai_api_key
You can get your API key from: https://makersuite.google.com/app/apikey
streamlit run app.pyOpen the web UI in your browser.
Upload one or more PDF files using the sidebar.
Click "Submit & Process" to extract, chunk, and embed the content.
Ask your questions in the input box and get responses powered by Gemini.
MIT License. You are free to use, share, and adapt the code.
