Spaces:
Sleeping
Sleeping
add quad boxes
Browse files
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=
|
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)
|