瀏覽代碼

Merge pull request #145 from zhanluxianshen/demo_gradio_annotion-fix

when bbox is none, return args is not match .
Qing Yan 2 月之前
父節點
當前提交
75bd78eaca
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      demo/demo_gradio_annotion.py

+ 1 - 1
demo/demo_gradio_annotion.py

@@ -260,7 +260,7 @@ def process_image_inference_with_annotation(annotation_data, test_image_input,
     if image is None:
         return None, "Please select a test image or add an image in the annotation component", "", "", gr.update(value=None), ""
     if bbox is None:
-        return "Please select a bounding box by mouse", "Please select a bounding box by mouse", "", "", gr.update(value=None)
+        return None, "Please select a bounding box by mouse", "Please select a bounding box by mouse", "", "", gr.update(value=None)
     
     try:
         # Process using DotsOCRParser, passing the bbox parameter