added multistep to docs (#1880)

This commit is contained in:
Abubakar Abid 2022-07-25 17:00:13 -07:00 committed by GitHub
parent cb2240158a
commit 0019c12844
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 1 deletions

View File

@ -262,7 +262,7 @@ class Blocks(BlockContext):
btn.click(fn=update, inputs=inp, outputs=out)
demo.launch()
Demos: blocks_hello, blocks_flipper, blocks_speech_text_length, generate_english_german
Demos: blocks_hello, blocks_flipper, blocks_speech_text_sentiment, generate_english_german
"""
def __init__(

View File

@ -39,6 +39,11 @@ $demo_reversible_flow
Note that `num1` can act as input to `num2`, and also vice-versa! As your apps get more complex, you will have many data flows connecting various Components.
Here's an example of a "multi-step" demo, where the output of one model (a speech-to-text model) gets fed into the next model (a sentiment classifier).
$code_blocks_speech_text_sentiment
$demo_blocks_speech_text_sentiment
## Function Return List vs Dict
So far, you have seen event listener functions with multiple outputs return a single value for each output component, in the order listed by the event listener. For example: