chandan06 commited on
Commit
a56bb1c
1 Parent(s): 4197a00

Update donut_inference.py

Browse files
Files changed (1) hide show
  1. donut_inference.py +1 -1
donut_inference.py CHANGED
@@ -44,7 +44,7 @@ def inference(image):
44
  sequence = sequence.replace(processor.tokenizer.eos_token, "").replace(processor.tokenizer.pad_token, "")
45
  sequence = re.sub(r"<.*?>", "", sequence, count=1).strip() # remove first task start token
46
  print(processor.token2json(sequence))
47
- print(f"Donut Inference time {start_time-end_time}")
48
  return processor.token2json(sequence)
49
 
50
  # data = inference(image)
 
44
  sequence = sequence.replace(processor.tokenizer.eos_token, "").replace(processor.tokenizer.pad_token, "")
45
  sequence = re.sub(r"<.*?>", "", sequence, count=1).strip() # remove first task start token
46
  print(processor.token2json(sequence))
47
+ print(f"Donut Inference time {end_time-start_time}")
48
  return processor.token2json(sequence)
49
 
50
  # data = inference(image)