cxeep commited on
Commit
6769189
·
1 Parent(s): 1be5f36

add raw results

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -16,7 +16,7 @@ def inference(img, lang):
16
  # image = Image.open(img_path).convert('RGB')
17
  boxes = [line[0] for line in result]
18
  txts = [line[1][0] for line in result]
19
- return '\n'.join(txts)
20
  # scores = [line[1][1] for line in result]
21
  # im_show = draw_ocr(image, boxes, txts, scores,
22
  # font_path='simfang.ttf')
@@ -33,7 +33,7 @@ gr.Interface(
33
  inference,
34
  [gr.inputs.Image(type='filepath', label='Input'),gr.inputs.Dropdown(choices=['ch', 'en', 'fr', 'german', 'korean', 'japan'], type="value", default='ch', label='language')],
35
  # gr.outputs.Image(type='file', label='Output'),
36
- outputs="text",
37
  title=title,
38
  description=description,
39
  article=article,
 
16
  # image = Image.open(img_path).convert('RGB')
17
  boxes = [line[0] for line in result]
18
  txts = [line[1][0] for line in result]
19
+ return '\n'.join(txts), result
20
  # scores = [line[1][1] for line in result]
21
  # im_show = draw_ocr(image, boxes, txts, scores,
22
  # font_path='simfang.ttf')
 
33
  inference,
34
  [gr.inputs.Image(type='filepath', label='Input'),gr.inputs.Dropdown(choices=['ch', 'en', 'fr', 'german', 'korean', 'japan'], type="value", default='ch', label='language')],
35
  # gr.outputs.Image(type='file', label='Output'),
36
+ outputs=["text", "text"],
37
  title=title,
38
  description=description,
39
  article=article,