diff --git a/select_video.py b/select_video.py index a8413f6..e734633 100644 --- a/select_video.py +++ b/select_video.py @@ -16,10 +16,11 @@ from itertools import groupby from typing import List from towhee import register +from towhee.operator import PyOperator @register(output_schema=['vec']) -class SelectVideo: +class SelectVideo(PyOperator): def __init__(self, top_k: int, reduce_function: str = 'sum', reverse: bool = True): self.top_k = top_k self.reduce_function = reduce_function