Omnibus commited on
Commit
677f943
Β·
1 Parent(s): 96d87b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -212,11 +212,11 @@ def detect(img, target_lang):
212
  bounds = reader.readtext(img)
213
  im = PIL.Image.open(img)
214
  im_out=draw_boxes(im, bounds)
215
- return im_out,pd.DataFrame(bounds).iloc[: , 1:],pd.DataFrame(bounds).iloc[: , -1:]
216
 
217
  with gr.Blocks() as robot:
218
  im=gr.Image(type="filepath")
219
- target_lang = gr.Dropdown(label="Target language", choices=list(lang_id.keys()),value="English")
220
 
221
  go_btn=gr.Button()
222
  out_im=gr.Image()
 
212
  bounds = reader.readtext(img)
213
  im = PIL.Image.open(img)
214
  im_out=draw_boxes(im, bounds)
215
+ return im_out,pd.DataFrame(bounds),pd.DataFrame(bounds).iloc[: , 1:]
216
 
217
  with gr.Blocks() as robot:
218
  im=gr.Image(type="filepath")
219
+ target_lang = gr.Dropdown(label="Detect language", choices=list(lang_id.keys()),value="English")
220
 
221
  go_btn=gr.Button()
222
  out_im=gr.Image()