Spaces:
Build error
Build error
Upload app.py
Browse files
app.py
CHANGED
|
@@ -21,7 +21,7 @@ processor = LayoutXLMProcessor.from_pretrained("amir22010/layoutxlm-xfund-ja")
|
|
| 21 |
model = LayoutLMv2ForTokenClassification.from_pretrained("amir22010/layoutxlm-xfund-ja",num_labels = 7)
|
| 22 |
|
| 23 |
# load image example
|
| 24 |
-
dataset = load_dataset("ranpox/xfund", 'xfund.ja', split="
|
| 25 |
image = Image.open(dataset[0]["image_path"]).convert("RGB")
|
| 26 |
image = Image.open("./invoice.png")
|
| 27 |
image.save("document.png")
|
|
|
|
| 21 |
model = LayoutLMv2ForTokenClassification.from_pretrained("amir22010/layoutxlm-xfund-ja",num_labels = 7)
|
| 22 |
|
| 23 |
# load image example
|
| 24 |
+
dataset = load_dataset("ranpox/xfund", 'xfund.ja', split="validation")
|
| 25 |
image = Image.open(dataset[0]["image_path"]).convert("RGB")
|
| 26 |
image = Image.open("./invoice.png")
|
| 27 |
image.save("document.png")
|