Coder Social home page Coder Social logo

vaibhavdangar09 / talk_with_pdf Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 144.43 MB

Talk_with_PDF is a powerful, AI-driven solution designed to automate the extraction of information and generation of answers based on PDF documents. By integrating OpenAI's advanced language models and embeddings, this system provides accurate and contextually relevant responses, making it an invaluable tool for education, business, and research.

Python 91.05% PowerShell 0.01% Shell 0.01% Batchfile 0.01% C 0.67% Cython 2.10% SWIG 0.03% C++ 5.79% Assembly 0.01% XSLT 0.02% Meson 0.01% Fortran 0.03% Forth 0.01% Smarty 0.02% CMake 0.01% Jinja 0.01% JavaScript 0.21% HTML 0.01% CSS 0.04% Roff 0.01%
aimodel faiss faiss-vector-database generative-ai large-language-model llm machine-learning machine-learning-algorithms openai openaiembeddings stream vector-database

talk_with_pdf's Introduction


Setting Up Python 3.11 Environment and OpenAI API for App

This guide will walk you through the steps to set up a Python 3.11 environment, create a virtual environment, activate it, set up your OpenAI API key, and finally run your app.py file.

Steps:

  1. Install Python 3.11:

    python install 3.11
    
  2. Create a Virtual Environment:

    To create a virtual environment named venv, run the following command:

    python -m venv venv
    
  3. Activate Your Virtual Environment:

    To activate the virtual environment, use the following command:

    source venv/bin/activate
    
  4. Set Up Your OpenAI API Key:

    After activating your virtual environment, add your OpenAI API key to the bashrc file:

    export OPENAI_API_KEY="enter_your_key"
    

    Replace "enter_your_key" with your actual OpenAI API key.

  5. Run Your App:

    Once you've completed all the above steps, you can start running your app.py file. Use the following command:

    streamlit run app.py
    

    This will launch your Streamlit application.

Project Description: Talk_with_PDF

Overview:

Talk_with_PDF is an innovative project leveraging advanced Large Language Models (LLMs) and Generative AI (GenAI) technologies from OpenAI to provide automated, intelligent responses to questions based on the content of a PDF document. This system integrates PDF document analysis with question-answering capabilities, making it a powerful tool for educational purposes, business analysis, and research assistance.

Key Features:

  1. PDF Upload and Analysis:

    Users can upload a PDF document to the system. The content of the PDF is processed and analyzed using OpenAI's language model and embeddings. CSV-based Question Handling:

  2. Users upload a CSV file containing a set of questions related to the uploaded PDF.

    Each question in the CSV file is sequentially processed by the system.

  3. Automated Question-Answering:

    The system utilizes OpenAI's language model to generate accurate and contextually relevant responses to each question based on the content of the PDF. The responses are generated using OpenAI embeddings to ensure high relevance and precision.

  4. Response Storage:

    The generated responses are stored in a new CSV file, aligning with the original questions for easy reference and further analysis.

Project UI

1. System Overview

Screenshot from 2024-05-08 17-14-51

2. Response Generation

Screenshot from 2024-05-08 17-15-18

3. Store response in CSV

Screenshot from 2024-05-08 17-16-09


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.