You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no way to pass custom params to the associated function that are not exposed to the user. It's beneficial to be able to pass params to the block's associated function without exposing them to the user.
If we try to do something like add a new param e.g.
It won't work because there's no way to provide for both self and my_custom_param.
There are several use cases for this but one is using the streamlit session_state and modifying it based upon which block is running.
Let's say we want a message (streamlit.info) that shows users which block is currently running. We can pass the session state to each block's function and modify the message to output which block is running. This is helpful for blocks with long running tasks and general error messaging to the user when something went wrong.
The text was updated successfully, but these errors were encountered:
In option_builder (https://github.com/krish-adi/barfi/blob/main/barfi/option_builder.py), the build_option function sets the option and valid types.
When we associate a function to a block e.g.
There is no way to pass custom params to the associated function that are not exposed to the user. It's beneficial to be able to pass params to the block's associated function without exposing them to the user.
If we try to do something like add a new param e.g.
It won't work because there's no way to provide for both self and my_custom_param.
There are several use cases for this but one is using the streamlit session_state and modifying it based upon which block is running.
Let's say we want a message (streamlit.info) that shows users which block is currently running. We can pass the session state to each block's function and modify the message to output which block is running. This is helpful for blocks with long running tasks and general error messaging to the user when something went wrong.
The text was updated successfully, but these errors were encountered: