-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from BatsResearch/update-huggingfacedocqa
Updating Wrappers for Document Models from transformers
- Loading branch information
Showing
4 changed files
with
99 additions
and
69 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Huggingfacedocument | ||
|
||
[Alfred Index](../../README.md#alfred-index) / | ||
[Alfred](../index.md#alfred) / | ||
[Fm](./index.md#fm) / | ||
Huggingfacedocument | ||
|
||
> Auto-generated documentation for [alfred.fm.huggingfacedocument](../../../alfred/fm/huggingfacedocument.py) module. | ||
- [Huggingfacedocument](#huggingfacedocument) | ||
- [HuggingFaceDocumentModel](#huggingfacedocumentmodel) | ||
|
||
## HuggingFaceDocumentModel | ||
|
||
[Show source in huggingfacedocument.py:14](../../../alfred/fm/huggingfacedocument.py#L14) | ||
|
||
The HuggingFaceModel class is a wrapper for HuggingFace Document Models | ||
For now, this class serves as an abstraction for DocumentQA-based prompted labelers. | ||
|
||
Currently supports: | ||
- Donut (MIT License) | ||
- LayoutLM (MIT License) | ||
- LayoutLMv2 (CC BY-NC-SA 4.0) | ||
- LayoutLMv3 (CC BY-NC-SA 4.0) | ||
|
||
#### Signature | ||
|
||
```python | ||
class HuggingFaceDocumentModel(LocalAccessFoundationModel): | ||
def __init__(self, model_string: str, local_path: Optional[str] = None): | ||
... | ||
``` | ||
|
||
#### See also | ||
|
||
- [LocalAccessFoundationModel](./model.md#localaccessfoundationmodel) | ||
|
||
|
This file contains 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