From f5aaced8d598d38ae016f62c204437b20211000e Mon Sep 17 00:00:00 2001 From: Kaiyuan Hu Date: Fri, 16 Sep 2022 11:25:15 +0800 Subject: [PATCH] Process generator input Signed-off-by: Kaiyuan Hu --- isc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/isc.py b/isc.py index 101d4a7..af85702 100644 --- a/isc.py +++ b/isc.py @@ -69,10 +69,11 @@ class Isc(NNOperator): ]) def __call__(self, data: Union[List[towhee._types.Image], towhee._types.Image]): - if not isinstance(data, list): + if isinstance(data, towhee._types.Image): imgs = [data] else: imgs = data + img_list = [] for img in imgs: img = self.convert_img(img)