hantech commited on
Commit
174240c
β€’
1 Parent(s): 6a34e60

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -86,7 +86,7 @@ def inference(filepath, lang, labels):
86
  im = PIL.Image.open(filepath)
87
  draw_boxes(im, bounds)
88
  im.save('result.jpg')
89
- return ['result.jpg', jsonText]
90
 
91
  title = 'EasyOCR'
92
  description = 'Gradio demo for EasyOCR. EasyOCR demo supports 80+ languages.To use it, simply upload your image and choose a language from the dropdown menu, or click one of the examples to load them. Read more at the links below.'
@@ -98,7 +98,7 @@ choices = [
98
  gr.Interface(
99
  inference,
100
  [gr.inputs.Image(type='filepath', label='Input'),gr.inputs.CheckboxGroup(choices, type="value", default=['vi'], label='language'), gr.inputs.Textbox(label='Labels',default='Người nα»™p, TiαΊΏp nhαΊ­n hα»“ sΖ‘ của')],
101
- [gr.outputs.Image(type='pil', label='Output'), gr.outputs.Textbox(label='Json')],
102
  title=title,
103
  description=description,
104
  article=article,
 
86
  im = PIL.Image.open(filepath)
87
  draw_boxes(im, bounds)
88
  im.save('result.jpg')
89
+ return ['result.jpg', texts, jsonText]
90
 
91
  title = 'EasyOCR'
92
  description = 'Gradio demo for EasyOCR. EasyOCR demo supports 80+ languages.To use it, simply upload your image and choose a language from the dropdown menu, or click one of the examples to load them. Read more at the links below.'
 
98
  gr.Interface(
99
  inference,
100
  [gr.inputs.Image(type='filepath', label='Input'),gr.inputs.CheckboxGroup(choices, type="value", default=['vi'], label='language'), gr.inputs.Textbox(label='Labels',default='Người nα»™p, TiαΊΏp nhαΊ­n hα»“ sΖ‘ của')],
101
+ [gr.outputs.Image(type='pil', label='Output'), gr.outputs.Textbox(label='Text'), gr.outputs.Textbox(label='Json')],
102
  title=title,
103
  description=description,
104
  article=article,