feat: 新增代码
This commit is contained in:
19
video_worker/app/backends/base.py
Normal file
19
video_worker/app/backends/base.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Any, Dict
|
||||
|
||||
|
||||
class BaseVideoBackend(ABC):
|
||||
backend_name: str
|
||||
model_name: str
|
||||
|
||||
@abstractmethod
|
||||
def load(self) -> None:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def is_loaded(self) -> bool:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
def generate(self, task_id: str, request_data: Dict[str, Any], output_dir: str) -> Dict[str, str]:
|
||||
raise NotImplementedError
|
||||
Reference in New Issue
Block a user