Skip to content

Adds multistep blocks to docs #1880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2022
Merged

Adds multistep blocks to docs #1880

merged 1 commit into from
Jul 26, 2022

Conversation

abidlabs
Copy link
Member

Adds a multistep demo to the new documentation around Blocks. I think this is sufficient to explain how a multistep block works, but if people feel like more explanation is needed, let me know!

@@ -262,7 +262,7 @@ def update(name):
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me but I actually can't run this demo locally?

I get

 raise ValueError("We expect a numpy ndarray as input")

Had to do

asr(speech[1].astype(float))

Copy link
Member Author

@abidlabs abidlabs Jul 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused by this -- speech should be a filepath. What does speech[1].astype(float) mean here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also tested on Spaces, and the code is running fine as it was written originally: https://huggingface.co/spaces/abidlabs/asr-test-pt

Is there something different on your local version of the demo?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abidlabs could be a difference in my transformers version.

I can’t check cause I’m at the airport now. Feel free to merge, as long as the demo works on the website were good!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, safe travels!

Copy link
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abidlabs Agree we don't need a whole guide but the demo you added doesn't work for me locally? Get an exception from transformers.

@abidlabs abidlabs merged commit 0019c12 into guides_restructure Jul 26, 2022
@abidlabs abidlabs deleted the multistep branch July 26, 2022 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants