nielsr HF staff commited on
Commit
5e691a8
1 Parent(s): 5b41482
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -49,7 +49,7 @@ def process_image(image):
49
  width, height = image.size
50
 
51
  # encode
52
- encoding = tokenizer(words, boxes=boxes, truncation=True, return_offsets_mapping=True, return_tensors="pt")
53
  offset_mapping = encoding.pop('offset_mapping')
54
 
55
  # forward pass
 
49
  width, height = image.size
50
 
51
  # encode
52
+ encoding = processor(words, boxes=boxes, truncation=True, return_offsets_mapping=True, return_tensors="pt")
53
  offset_mapping = encoding.pop('offset_mapping')
54
 
55
  # forward pass