ecarbo commited on
Commit
9a2a128
unverified
1 Parent(s): 5e1ae18

Add textbox

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,7 +19,7 @@ def inference(img, lang):
19
  im_show = draw_ocr(image, boxes, txts, scores, font_path='RightSans.ttf')
20
  im_show = Image.fromarray(im_show)
21
  im_show.save('result.jpg')
22
- return 'result.jpg'
23
 
24
 
25
  title = 'PaddleOCR'
@@ -30,7 +30,7 @@ css = ".output_image, .input_image {height: 40rem !important; width: 100% !impor
30
  gr.Interface(
31
  inference,
32
  [gr.inputs.Image(type='file', label='Input'),gr.inputs.Dropdown(choices=['ch', 'en', 'fr', 'german', 'korean', 'japan'], type="value", default='en', label='language')],
33
- gr.outputs.Image(type='file', label='Output'),
34
  title=title,
35
  description=description,
36
  article=article,
 
19
  im_show = draw_ocr(image, boxes, txts, scores, font_path='RightSans.ttf')
20
  im_show = Image.fromarray(im_show)
21
  im_show.save('result.jpg')
22
+ return 'result.jpg', result
23
 
24
 
25
  title = 'PaddleOCR'
 
30
  gr.Interface(
31
  inference,
32
  [gr.inputs.Image(type='file', label='Input'),gr.inputs.Dropdown(choices=['ch', 'en', 'fr', 'german', 'korean', 'japan'], type="value", default='en', label='language')],
33
+ [gr.outputs.Image(type='file', label='Output'), gr.outputs.Textbox(type='text', label='Prediction')],
34
  title=title,
35
  description=description,
36
  article=article,