GithubHelp home page GithubHelp logo

doc-ai-demo's Introduction

About The Project

This demo illustrates the capabilities of Document AI and Gemini.

Deploy the app locally

  • Create a document AI processor , in this case , it is an OCR type processor.

  • Create a .env file with the following environment variables:

    PROJECT_ID='YOUR_PROJECT_ID'
    LOCATION='eu'
    PROCESSOR_ID ='YOUR_DOCUMENT_AI_PROCESSOR_ID'
  • Create a Dockerfile file

  • Build the image locally, cd into your project folder and run.

    docker buildx build .
  • Run the docker image using the application default credentials used for authentication.

    docker run -v "Path to you loclal application default credentials i.e application_default_credentials.json":/gcp/creds.json:ro  --env GOOGLE_APPLICATION_CREDENTIALS=/gcp/creds.json -p 8080:8080  "YOUR_DOCKER_IMAGE"
  • Access the app via the localhost.

Deploy the app on cloud run

  • Create a document AI processor , in this case , it is an OCR type processor.
  • Create a .env file with the following environment variables:
    PROJECT_ID='YOUR_PROJECT_ID'
    LOCATION='eu'
    PROCESSOR_ID ='YOUR_DOCUMENT_AI_PROCESSOR_ID'
  • Create a Dockerfile file
  • Build the image and push it to conatiner registry
    gcloud builds submit --tag gcr.io/YOUR_PROJECT_ID/DEMO_NAME_OF_YOUR_CHOICE --timeout=1h
  • Create a service in cloud run based on the built image.
  • Access the app via the link provided by the cloud run service.

doc-ai-demo's People

Contributors

salimbsy avatar

Watchers

Gonçalo Miguel avatar Payam 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.