mp-02 commited on
Commit
c951098
·
verified ·
1 Parent(s): 386d045

Update inference.py

Browse files
Files changed (1) hide show
  1. inference.py +1 -1
inference.py CHANGED
@@ -38,7 +38,7 @@ def prediction(image):
38
 
39
  boxes, words = OCR(image)
40
  # Preprocessa l'immagine e il testo con il processore di LayoutLMv3
41
- encoding = processor(image, words=words, boxes=boxes, return_tensors="pt", padding="max_length", truncation=True)
42
 
43
  # Esegui l'inferenza con il modello fine-tuned
44
  with torch.no_grad():
 
38
 
39
  boxes, words = OCR(image)
40
  # Preprocessa l'immagine e il testo con il processore di LayoutLMv3
41
+ encoding = processor(image, words, boxes=boxes, return_tensors="pt", padding="max_length", truncation=True)
42
 
43
  # Esegui l'inferenza con il modello fine-tuned
44
  with torch.no_grad():