hantech commited on
Commit
56cdfa2
β€’
1 Parent(s): d2f41b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -56,7 +56,7 @@ def inference(filepath, lang):
56
  out = translate(img, model)[0].tolist()
57
  out = vocab.decode(out)
58
  new_bounds.append((bbox, out, prob))
59
- im = PIL.Image.open(img.name)
60
  draw_boxes(im, bounds)
61
  im.save('result.jpg')
62
  return ['result.jpg', pd.DataFrame(new_bounds).iloc[: , 1:]]
 
56
  out = translate(img, model)[0].tolist()
57
  out = vocab.decode(out)
58
  new_bounds.append((bbox, out, prob))
59
+ im = PIL.Image.open(filepath)
60
  draw_boxes(im, bounds)
61
  im.save('result.jpg')
62
  return ['result.jpg', pd.DataFrame(new_bounds).iloc[: , 1:]]