Giter Club home page Giter Club logo

chat-with-pdfs-using-gemini-api's Introduction

Chat with Multiple PDFs using Gemini-powered Q&A

Project Description

This project harnesses the power of the Gemini API to enable conversational interactions with PDF documents. By integrating Gemini API key, users can engage in chat-based queries and receive detailed responses directly from their uploaded PDFs. It streamlines the process of extracting information from multiple PDFs and facilitates seamless communication with the documents' contents.

Installation

To install the necessary dependencies, run:

pip install -r requirements.txt

Usage

  • Upload your PDF files.
  • Ask questions related to the uploaded PDFs.
  • Receive detailed responses based on the content of the PDF documents.

Code Structure

  • get_pdf_text(pdf_docs): Extracts all text from the uploaded PDFs, akin to a comprehensive highlighter.
  • get_text_chunks(text): Divides the extracted text into smaller, more manageable segments.
  • get_vector_store(text_chunks): Converts the segmented text into a specialized code for computational understanding, resembling a secret language for text.
  • get_conversational_chain(): Serves as the core engine, formulating queries to the computer based on the PDFs and retrieving elaborative answers.
  • user_input(user_question): Translates user questions into the secret computer language, seeks answers from the document content using the core engine, and presents the responses in plain English.
  • main(): Entry point for executing the program.

Tools used

  • Google Generative AI (Google Gemini API): Utilized for generating responses based on user queries and document content.
  • Google Generative AI Embeddings: Used for generating embeddings (vector representations) of text chunks extracted from PDF documents.
  • Streamlit: Facilitates the creation of interactive web applications for easy user interaction.
  • langchain: Enables the conversion of text into a specialized code for computational understanding.
  • FAISS Vector Database: Used for storing and retrieving vector representations of text chunks, enhancing computational efficiency.

chat-with-pdfs-using-gemini-api's People

Contributors

sai-kartheek-reddy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.