-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Update component config #1089
Update component config #1089
Conversation
Can we have the behavior that setting the |
I talked about this some more with @aliabid94 and we felt it would be better to actually just have a property for every component called Note that some components (e.g. |
Tests need to be updated + see my comments above. Other than that, works amazing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work!
Created the different approach suggestion in #1211 you could drop your thoughts there. @aliabid94 |
Allow users to update component config parameter with
gr.update()
or with componentgr.Textbox.update()
. Changed backend to provide type hints and validation so users can't pass bad parameters.Valid formats:
gr.update(lines=5)
gr.Textbox.update(lines=5)
gr.Textbox.update(lines=5, value='hello')
See blocks_update/run.py for example
Also: