GithubHelp home page GithubHelp logo

xianchengz / pdf-ai Goto Github PK

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

Full Stack Application to chat with ChatGPT with knowledge from uploaded PDFs

Python 37.27% JavaScript 4.23% CSS 0.65% HTML 3.69% TypeScript 19.30% Svelte 34.87%

pdf-ai's Introduction

PDF AI

Integrated with Langchain to utilize OpenAI API or Llama to read PDF.

Architecture

The project include several components and they can be visualized as below. image

Key Components

Backend

Two major components for the backend server are Flask and Langchain. Flask is used to build all REST endpoints and Langchain is used to interact with LLMs.

PostgreSQL

Postgres is used to store metadata including user information and PDF metadata that user uploaded.

AWS S3

All uploaded PDFs are stored in S3.

Pinecone

Pinecone as a vector database is used to store vector embedding of each PDF document, which is then used for retrieving relevant contents from PDF based on user's questions.

Local Setup

Prerequisites

Make sure you have the following items downloaded.

  • Python3
  • Docker

Setup

  1. create a .env file with global variables from env-var-list.
  2. Create a virtual environment.
python -m venv .venv
  1. Activate virtual environment with
source .venv/bin/activate
  1. Start up Postgres and Redis instance with inv run-local-infra.
  2. Initialize database with inv init-db.
  3. Start the application with inv dev.
  4. Open a new terminal (make sure to activate the virtual env), start celery worker with inv devworker

pdf-ai's People

Contributors

xianchengz avatar

Watchers

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