nielsr HF staff commited on
Commit
9ebcf18
1 Parent(s): 5e691a8

Fix another bug

Browse files
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 = processor(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(image, truncation=True, return_offsets_mapping=True, return_tensors="pt")
53
  offset_mapping = encoding.pop('offset_mapping')
54
 
55
  # forward pass