Я новичок в dash и не могу узнать, как обновить значение виджета, не создавая функцию и не оборачивая ее обратным вызовом и вводом из другого виджета.
import dash
from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash()
# create radio items widget
widget=dcc.RadioItems(
options=[
{'label': 'New York City', 'value': 'NYC'},
{'label': 'Montreal', 'value': 'MTL'},
{'label': 'San Francisco', 'value': 'SF'}
],
value='MTL')
# append this to a html.div children.
div = html.Div([widget])
app.layout = div
if __name__ == '__main__':
app.run_server(debug=True)
# normally I would like to be able to update the widget value programmatically and have the html UI updated automatically too
widget.set_value('SF')
ценю любую помощь