mirror of
https://github.com/BoardWare-Genius/jarvis-models.git
synced 2025-12-13 16:53:24 +00:00
16 lines
612 B
Python
16 lines
612 B
Python
from blackbox.audio_to_text import AudioToText
|
|
from blackbox.blackbox import Blackbox
|
|
from blackbox.calculator import Calculator
|
|
from blackbox.text_to_audio import TextToAudio
|
|
|
|
|
|
class BlackboxFactory:
|
|
|
|
def create_blackbox(self, blackbox_type: str, blackbox_config: dict) -> Blackbox:
|
|
if blackbox_type == "audio_to_text":
|
|
return AudioToText(blackbox_config)
|
|
if blackbox_type == "text_to_audio":
|
|
return TextToAudio(blackbox_config)
|
|
if blackbox_type == "calculator":
|
|
return Calculator(blackbox_config)
|
|
raise ValueError("Invalid blockbox type") |