Upgrade the declarative pipeline for cleaner interface (#51)

This commit is contained in:
Nguyen Trung Duc (john)
2023-10-24 11:12:22 +07:00
committed by GitHub
parent aab982ddc4
commit 9035e25666
26 changed files with 365 additions and 169 deletions

View File

@@ -26,9 +26,9 @@ def build_from_dict(config: Union[str, dict]):
for key, value in config_dict.items():
pipeline_def = import_dotted_string(key, safe=False)
if value["ui-type"] == "chat":
demos.append(build_chat_ui(value, pipeline_def))
demos.append(build_chat_ui(value, pipeline_def).queue())
else:
demos.append(build_pipeline_ui(value, pipeline_def))
demos.append(build_pipeline_ui(value, pipeline_def).queue())
if len(demos) == 1:
demo = demos[0]
else: