Tonic commited on
Commit
4034764
·
unverified ·
1 Parent(s): 19975ad

add quad boxes

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -197,7 +197,7 @@ def main_process(image, task):
197
  text_output = result.get('<OCR_WITH_REGION>', {}).get('recognized_text', 'No text found')
198
  # Debugging: Print the recognized text
199
  print(f"Recognized Text: {text_output}")
200
- return output_image, gr.update(visible=True), text_output, gr.update(visible=True)
201
  else:
202
  fig = plot_bbox(image, result.get(TASK_PROMPTS[task], {}))
203
  output_image = fig_to_pil(fig)
 
197
  text_output = result.get('<OCR_WITH_REGION>', {}).get('recognized_text', 'No text found')
198
  # Debugging: Print the recognized text
199
  print(f"Recognized Text: {text_output}")
200
+ return output_image, gr.update(visible=True), text_output, gr.update(visible=False)
201
  else:
202
  fig = plot_bbox(image, result.get(TASK_PROMPTS[task], {}))
203
  output_image = fig_to_pil(fig)