sooooner commited on
Commit
c0e69ff
Β·
1 Parent(s): 5b80e47
Files changed (1) hide show
  1. utils.py +1 -1
utils.py CHANGED
@@ -79,7 +79,7 @@ class Image2Text:
79
  seq = re.sub(r"<.*?>", "", seq, count=1).strip()
80
  seq = self.processor.token2json(seq)
81
  contents = seq['content'].split('[newline]')
82
- return seq, contents
83
 
84
  def get_text(self, img_path, num_beams=4):
85
  pixel_values = self.load_img(img_path)
 
79
  seq = re.sub(r"<.*?>", "", seq, count=1).strip()
80
  seq = self.processor.token2json(seq)
81
  contents = seq['content'].split('[newline]')
82
+ return contents
83
 
84
  def get_text(self, img_path, num_beams=4):
85
  pixel_values = self.load_img(img_path)