Hello,
Apologies if this is a silly question. I am still learning. I want to take in a series of inputs, and based on each input, return a calculated result as an output for the user to see.
Please see an example below:
@app.callback(
dash.dependencies.Output(‘output-state’, ‘children’),
[dash.dependencies.Input(‘submit-button’, ‘n_clicks’)],
[State(‘line’,‘value’),
State(‘length’, ‘value’),
State(‘count’, ‘value’),
State(‘depth’, ‘value’),
State(‘hdd’, ‘value’)])
def update_output(n_clicks,line,length,count,depth,hdd):
if pipeline == ‘QC’:
if length == ‘E’:
return 'Total Size is {} '.format(count*12)
The above is treating count as a string instead of an integer, even though the original input has type=‘number’.
Please let me know how I might be able to do this in an efficient way.
Thanks!