Upgrade promptui to conform to Gradio V4 (#98)

This commit is contained in:
Duc Nguyen (john)
2023-12-07 15:24:07 +07:00
committed by GitHub
parent 797df5a69c
commit 1f927d3391
7 changed files with 68 additions and 56 deletions

View File

@@ -84,9 +84,7 @@ def handle_node(node: dict) -> dict:
def handle_input(pipeline: Union[BaseComponent, Type[BaseComponent]]) -> dict:
"""Get the input from the pipeline"""
if not hasattr(pipeline, "run_raw"):
return {}
signature = inspect.signature(pipeline.run_raw)
signature = inspect.signature(pipeline.run)
inputs: Dict[str, Dict] = {}
for name, param in signature.parameters.items():
if name in ["self", "args", "kwargs"]: