Initial Feature: Add a Rust Library for Document AI Tasks with Hugging Face Integration#2
Open
sarrah-basta wants to merge 1 commit into
Open
Initial Feature: Add a Rust Library for Document AI Tasks with Hugging Face Integration#2sarrah-basta wants to merge 1 commit into
sarrah-basta wants to merge 1 commit into
Conversation
…ntegration (#1) Added an initial commit for the Rust library, "DocAI-HuggingFaces-Rs," which introduces a powerful Document Classification task. The commit includes the following updates: - Implemented a working example for document classification. - Corrected the Cargo.toml file. - Added shell scripts for easy installation and running examples, with support for displaying formatted output results for classification. - Cleaned up the code and addressed warnings while allowing for future code extensions. - Included credits and further code cleanup. - Updated the script to use the release tarball instead of the master branch for building from source. - Updated the repository name to match the project's focus. Signed-off-by: Sarrah Bastawala <sarrah.basta@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DocAI-HuggingFaces-Rs: A Rust Library for Document AI with Hugging Face Models
Introduction
This pull request introduces DocAI-HuggingFaces-Rs, a new Rust library designed for Document AI tasks using models accessible through Hugging Face. The library focuses on tasks related to document analysis and integrates seamlessly with the WasmEdge WASI-NN environment.
Library Structure
The library includes task APIs with three main types:
XxxBuilder: Used to create task instances with various configuration options.Xxx: Represents a task instance containing essential task and model information.XxxSession: A running session for carrying out pre-processing, inference, and post-processing, along with the capability to store intermediate results.Available Tasks
DocAI-HuggingFaces-Rs currently supports Document Classification, which includes the following components:
DocumentClassifierBuilder: Create a task instance.DocumentClassifier: The task instance with key task and model details.DocumentClassifierSession: A running session for managing pre-processing, inference, and post-processing.Examples
The pull request provides comprehensive code examples that demonstrate the library's functionality, including document classification. DocAI-HuggingFaces-Rs showcases superior performance and user-friendliness, making it an ideal choice for Document AI tasks, especially when combined with the WasmEdge WASI-NN environment.
Acknowledgments
This contribution is made possible through collaboration with Microsoft's work on Hugging Faces and the dedicated efforts of yanghaku in developing WasmEdge/mediapipe-rs.
Objectives
This PR introduces a powerful Rust library designed to simplify Document AI tasks using Hugging Face models. It extends the capabilities of WasmEdge's WASI-NN environment, making it easier than ever to perform document analysis and processing.
Contributor: Sarrah Bastawala sarrah.basta@gmail.com