This commit is contained in:
Dan Chen
2024-03-18 16:19:26 +08:00
parent 253577da04
commit afb78295c8
6 changed files with 62 additions and 55 deletions

View File

@ -1,18 +1,21 @@
from abc import ABC, abstractmethod
from fastapi import Request, Response
class Blackbox(ABC):
def __init__(self, config: any) -> None:
pass
@abstractmethod
def processing(self, data: any):
pass
@abstractmethod
def valid(self, data: any) -> bool:
pass
class TextToAudio(Blackbox):
def processing(self, data: any):
print("TextToAudio processing")
@abstractmethod
def fast_api_handler(self, request: Request) -> Response:
pass