feat: text_and_image blockbox

This commit is contained in:
superobk
2024-04-25 14:57:08 +08:00
parent 21d159de9b
commit 201d0f374c
3 changed files with 38 additions and 3 deletions

View File

@ -10,6 +10,7 @@ from .text_to_audio import TextToAudio
from .tesou import Tesou
from .fastchat import Fastchat
from .g2e import G2E
from .text_and_image import TextAndImage
class BlackboxFactory:
@ -25,6 +26,7 @@ class BlackboxFactory:
self.fastchat = Fastchat()
self.audio_chat = AudioChat(self.asr, self.tesou, self.tts)
self.g2e = G2E()
self.text_and_image = TextAndImage()
def __call__(self, *args, **kwargs):
return self.processing(*args, **kwargs)
@ -52,4 +54,6 @@ class BlackboxFactory:
return self.audio_chat
if blackbox_name == "g2e":
return self.g2e
if blackbox_name == 'text_and_image':
return self.text_and_image
raise ValueError("Invalid blockbox type")