
**InvoiceReceiptClassifier_LayoutLMv3** is a fine-tuned LayoutLMv3 model that classifies a document to an invoice or receipt.
## Quick start: using the raw model
```python
from transformers import (
    AutoModelForSequenceClassification,
    AutoProcessor,
)
from PIL import Image
from urllib.request import urlopen
model = AutoModelForSequenceClassification.from_pretrained("fedihch/InvoiceReceiptClassifier_LayoutLMv3")
processor = AutoProcessor.from_pretrained("fedihch/InvoiceReceiptClassifier_LayoutLMv3")
input_img_url = "https://upload.wikimedia.org/wikipedia/commons/thumb/0/0b/ReceiptSwiss.jpg/1024px-ReceiptSwiss.jpg"
with urlopen(input_img_url) as testImage:
    input_img = Image.open(testImage).convert("RGB")
    
encoded_inputs = processor(input_img, padding="max_length", return_tensors="pt")
outputs = model(**encoded_inputs)
logits = outputs.logits
predicted_class_idx = logits.argmax(-1).item()
id2label = {0: "invoice", 1: "receipt"}
print(id2label[predicted_class_idx])
```

{"language": ["es", "en", "multilingual"], "license": "other", "tags": ["image-classification"], "pipeline_tag": "image-classification", "widget": [{"src": "https://upserve.com/media/sites/2/Bill-from-Mezcalero-in-Washington-D.C.-photo-by-Alfredo-Solis-1-e1507226752437.jpg", "example_title": "receipt"}, {"src": "https://templates.invoicehome.com/invoice-template-us-neat-750px.png", "example_title": "invoice"}]}
transformers pytorch layoutlmv3 feature-extraction image-classification es en multilingual license:other endpoints_compatible region:us
TAGS
#transformers #pytorch #layoutlmv3 #feature-extraction #image-classification #es #en #multilingual #license-other #endpoints_compatible #region-us 


InvoiceReceiptClassifier_LayoutLMv3 is a fine-tuned LayoutLMv3 model that classifies a document to an invoice or receipt.
## Quick start: using the raw model


## Quick start: using the raw model
TAGS
#transformers #pytorch #layoutlmv3 #feature-extraction #image-classification #es #en #multilingual #license-other #endpoints_compatible #region-us 
 ## Quick start: using the raw model
passage: TAGS
#transformers #pytorch #layoutlmv3 #feature-extraction #image-classification #es #en #multilingual #license-other #endpoints_compatible #region-us 
## Quick start: using the raw model