Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -82,7 +82,7 @@ def inference(filepath, lang, labels):
|
|
82 |
out = recognitor.predict(cropped_image)
|
83 |
texts = texts + '\t' + out
|
84 |
result = query(texts, labels)
|
85 |
-
jsonText = json.dumps(result)
|
86 |
im = PIL.Image.open(filepath)
|
87 |
draw_boxes(im, bounds)
|
88 |
im.save('result.jpg')
|
|
|
82 |
out = recognitor.predict(cropped_image)
|
83 |
texts = texts + '\t' + out
|
84 |
result = query(texts, labels)
|
85 |
+
jsonText = json.dumps(result, ensure_ascii=False).encode('utf8')
|
86 |
im = PIL.Image.open(filepath)
|
87 |
draw_boxes(im, bounds)
|
88 |
im.save('result.jpg')
|