mishtert commited on
Commit
9d3b7c8
·
1 Parent(s): 90251c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,11 +18,11 @@ from PIL import Image, ImageDraw, ImageFont
18
 
19
  processor = LayoutLMv2Processor.from_pretrained("microsoft/layoutlmv2-base-uncased")
20
  #model = LayoutLMv2ForTokenClassification.from_pretrained("nielsr/layoutlmv2-finetuned-funsd")
21
- model = LayoutLMv2ForTokenClassification.from_pretrained("Mishtert/Invoice_extraction_categorization")
22
 
23
  # load image example
24
  #dataset = load_dataset("nielsr/funsd", split="test")
25
- dataset = load_dataset("Mishtert/niefunsd", split="test")
26
  image = Image.open(dataset[0]["image_path"]).convert("RGB")
27
  image = Image.open("./invoice.png")
28
  image.save("document.png")
 
18
 
19
  processor = LayoutLMv2Processor.from_pretrained("microsoft/layoutlmv2-base-uncased")
20
  #model = LayoutLMv2ForTokenClassification.from_pretrained("nielsr/layoutlmv2-finetuned-funsd")
21
+ model = LayoutLMv2ForTokenClassification.from_pretrained("mishtert/Invoice_extraction_categorization")
22
 
23
  # load image example
24
  #dataset = load_dataset("nielsr/funsd", split="test")
25
+ dataset = load_dataset("mishtert/niefunsd", split="test")
26
  image = Image.open(dataset[0]["image_path"]).convert("RGB")
27
  image = Image.open("./invoice.png")
28
  image.save("document.png")