Instructions to use fedihch/InvoiceReceiptClassifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use fedihch/InvoiceReceiptClassifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="fedihch/InvoiceReceiptClassifier") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoProcessor, AutoModelForSequenceClassification processor = AutoProcessor.from_pretrained("fedihch/InvoiceReceiptClassifier") model = AutoModelForSequenceClassification.from_pretrained("fedihch/InvoiceReceiptClassifier") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
**InvoiceReceiptClassifier** is a fine-tuned LayoutLMv2 model that classifies a document to an invoice or receipt.
|
| 2 |
|
| 3 |
## Quick start: using the raw model
|
|
@@ -27,4 +34,5 @@ logits = outputs.logits
|
|
| 27 |
predicted_class_idx = logits.argmax(-1).item()
|
| 28 |
id2label = {0: "invoice", 1: "receipt"}
|
| 29 |
print(id2label[predicted_class_idx])
|
| 30 |
-
```
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- spa
|
| 4 |
+
license: "other"
|
| 5 |
+
datasets:
|
| 6 |
+
- Custom dataset
|
| 7 |
+
---
|
| 8 |
**InvoiceReceiptClassifier** is a fine-tuned LayoutLMv2 model that classifies a document to an invoice or receipt.
|
| 9 |
|
| 10 |
## Quick start: using the raw model
|
|
|
|
| 34 |
predicted_class_idx = logits.argmax(-1).item()
|
| 35 |
id2label = {0: "invoice", 1: "receipt"}
|
| 36 |
print(id2label[predicted_class_idx])
|
| 37 |
+
```
|
| 38 |
+
|