PDF Oracle is a Streamlit-based application that lets you chat with multiple PDFs using the power of LangChain and Google Generative AI (Gemini). Simply upload your PDFs, ask questions, and get accurate, context-aware answers directly from the content of your documents.
- π Upload Multiple PDFs β Import and work with multiple documents at once.
- π Semantic Search β Finds the most relevant chunks of text for your queries.
- π¬ Interactive Chat β Ask natural language questions and get AI-powered answers.
- π§ Powered by LangChain + Gemini β Combines document embeddings with LLM reasoning.
- β‘ Fast & Lightweight β Simple Streamlit interface, easy to use.
Clone the repository and set up your virtual environment:
# Clone the repo
git clone https://github.com/AbdullahAli2005/PDF-Oracle.git
cd pdf_oracle_masterpiece
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # For Linux/Mac
.venv\Scripts\activate # For Windows
# Install dependencies
pip install -r requirements.txtThis project uses Google Generative AI (Gemini). Youβll need an API key:
- Get your API key from Google AI Studio.
- Create a
.envfile in the project root and add:
GOOGLE_API_KEY=your_api_key_hereRun the Streamlit app:
streamlit run app.pyThen open the link shown in your terminal (usually http://localhost:8501).
- PDF Upload β You upload one or more PDFs.
- Text Extraction β The text is extracted and split into chunks.
- Embeddings β Chunks are converted into vector embeddings using LangChain.
- FAISS Vector Store β Embeddings are stored for fast retrieval.
- Querying β When you ask a question, relevant chunks are retrieved.
- AI Response β Gemini LLM processes retrieved content and answers your query.
- Add support for more file types (Word, Excel, etc.)
- Add chat history and export
- Improve UI/UX with custom themes
- Deploy to Streamlit Cloud
Contributions are welcome! Feel free to fork the repo and submit a pull request.
This project is licensed under the MIT License.
Developed with β€οΈ by Abdullah Ali.