Skip to content

Latest commit

Β 

History

History
109 lines (69 loc) Β· 2.74 KB

File metadata and controls

109 lines (69 loc) Β· 2.74 KB

πŸ“„ PDF Oracle

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.


πŸš€ Features

  • πŸ“‚ 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.

πŸ› οΈ Tech Stack


πŸ“₯ Installation

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.txt

πŸ”‘ Setup API Key

This project uses Google Generative AI (Gemini). You’ll need an API key:

  1. Get your API key from Google AI Studio.
  2. Create a .env file in the project root and add:
GOOGLE_API_KEY=your_api_key_here

▢️ Usage

Run the Streamlit app:

streamlit run app.py

Then open the link shown in your terminal (usually http://localhost:8501).


πŸ“š How It Works

  1. PDF Upload – You upload one or more PDFs.
  2. Text Extraction – The text is extracted and split into chunks.
  3. Embeddings – Chunks are converted into vector embeddings using LangChain.
  4. FAISS Vector Store – Embeddings are stored for fast retrieval.
  5. Querying – When you ask a question, relevant chunks are retrieved.
  6. AI Response – Gemini LLM processes retrieved content and answers your query.

πŸ“Œ Roadmap

  • Add support for more file types (Word, Excel, etc.)
  • Add chat history and export
  • Improve UI/UX with custom themes
  • Deploy to Streamlit Cloud

🀝 Contributing

Contributions are welcome! Feel free to fork the repo and submit a pull request.


πŸ“œ License

This project is licensed under the MIT License.


πŸ‘¨β€πŸ’» Author

Developed with ❀️ by Abdullah Ali.