GithubHelp home page GithubHelp logo

du-cloud-apis's Introduction

Document Understanding Cloud APIs Example

This code snippet demonstrates how to digitize, classify, validate, and extract documents using UiPath Document Understanding API's.

Official Documentation

UiPath Document Understanding offers standalone capabilities, allowing integration with external tools and systems through APIs. This release includes APIs for Discovery, Digitization, Classification, Extraction, and Validation. Please take a look at the Official Documentation.

Process Flowchart

Requirements

  • Python 3.11+
  • requests library
  • python-dotenv library

Setup

  1. Clone the repository to your local machine:

    git clone https://github.com/nvpnathan/DU-Cloud-APIs.git
  2. Navigate to the project directory:

    cd DU-Cloud-APIs
  3. Create a Python virtual environment:

     python3 -m venv venv
     source venv/bin/activate
  4. Install the required dependencies:

    pip3 install -r requirements.txt
  5. Set up your environment variables by copying .env.example to .env file in the root directory and provide the APP_ID and APP_SECRET from your Cloud Envirnment:

APP_ID=
APP_SECRET=
AUTH_URL=https://cloud.uipath.com/identity_/connect/token
BASE_URL=https://cloud.uipath.com/<Cloud Org>/<Cloud Tenant>/du_/api/framework/projects/
PROJECT_ID=00000000-0000-0000-0000-000000000000

Usage

Processing Documents

  1. Place the documents you want to process in the specified folder (Example Documents by default).

  2. Run the main script main.py to process the documents:

    python3 src/main.py
  3. Monitor the console output for processing status and any errors.

  4. Extracted results will be printed to the console and saved in CSV format in the same folder as the processed documents.

File Structure

The project structure is organized as follows:

DU-Cloud-APIs/
│
├── src/
│   ├── main.py         # Main entry point for the application
│   ├── auth.py         # Authentication module for obtaining bearer token
│   ├── digitize.py     # Digitize module for initiating document digitization
│   ├── classify.py     # Classify module for document classification
│   ├── extract.py      # Extract module for document extraction
│   ├── validate.py     # Validate module for document validation
│   └── result_utils.py # Utility module for printing and writing extraction results
│
├── .env.example         # Example environment variables file
├── requirements.txt     # Python modules configuration file
├── example_documents/   # Folder containing example documents
├── generative_prompts/  # Folder containing Extraction and Classification Prompt Templates
└── output_results/      # Folder containing the CSV's of the Document Extraction Results

TODO

  • Write Tests
  • Write Discovery API
  • Add Black

du-cloud-apis's People

Contributors

nvpnathan avatar

Stargazers

Bryant Biggs avatar James Dickson avatar

Watchers

 avatar  avatar

Forkers

jms-dcksn

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.