Spaces:
Sleeping
Sleeping
Update inference.py
Browse files- 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
|
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():
|