diff --git a/appbuilder/core/components/animal_recognize/component.py b/appbuilder/core/components/animal_recognize/component.py index 239711ad8..ffd735a9f 100644 --- a/appbuilder/core/components/animal_recognize/component.py +++ b/appbuilder/core/components/animal_recognize/component.py @@ -166,6 +166,8 @@ def _recognize_w_post_process(self, img_path, img_url, file_urls) -> str: if img_path in file_urls: req.url = file_urls[img_path] if img_url: + if img_url in file_urls: + img_url = file_urls['img_url'] req.url = img_url req.top_num = 6 req.baike_num = 0 diff --git a/appbuilder/core/components/image_understand/component.py b/appbuilder/core/components/image_understand/component.py index 66c9be424..19fa68d68 100644 --- a/appbuilder/core/components/image_understand/component.py +++ b/appbuilder/core/components/image_understand/component.py @@ -188,6 +188,8 @@ def _recognize_w_post_process(self, img_path, img_url, file_urls, question="图 if img_path in file_urls: req.url = file_urls[img_path] if img_url: + if img_url in file_urls: + img_url = file_urls['img_url'] req.url = img_url response = self.__recognize(req) description_to_llm = response.result.description_to_llm diff --git a/appbuilder/core/components/plant_recognize/component.py b/appbuilder/core/components/plant_recognize/component.py index a503cf519..b679eccf1 100644 --- a/appbuilder/core/components/plant_recognize/component.py +++ b/appbuilder/core/components/plant_recognize/component.py @@ -171,6 +171,8 @@ def _recognize_w_post_process(self, img_path, img_url, file_urls): if img_path in file_urls: req.url = file_urls[img_path] if img_url: + if img_url in file_urls: + img_url = file_urls['img_url'] req.url = img_url req.top_num = 6 req.baike_num = 0