Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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(
|
| 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:]]
|