Spaces:
Runtime error
Runtime error
| from minichain import prompt, Mock, show | |
| import minichain | |
| def prompt_function1(model, x): | |
| return model(x) | |
| def prompt_function2(model, x): | |
| return model(dict(x=x)) | |
| def run(query): | |
| x = prompt_function1(query) | |
| return prompt_function2(prompt_function2(x)) | |
| demo = show(run, | |
| examples=["a"], | |
| subprompts=[prompt_function1, prompt_function2, prompt_function2]) | |
| if __name__ == "__main__": | |
| demo.launch() | |