20 lines
467 B
Python
20 lines
467 B
Python
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
|