You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
435 B

from dash import Dash, dcc, html, Input, Output,callback
9 months ago
app = Dash(__name__)
9 months ago
app.layout = html.Div([
dcc.Dropdown(['NYC', 'MTL', 'SF'], 'NYC', id='demo-dropdown'),
html.Div(id='dd-output-container')
])
9 months ago
@callback(
Output('dd-output-container', 'children'),
Input('demo-dropdown', 'value')
)
def update_output(value):
return f'You have selected {value}'
9 months ago
if __name__ == '__main__':
#app.run(debug=True)
app.run(debug=False)