Hello! I had some list of outputs in the following code:
normalized_features = ["a", "b", "c"]
@app.callback(
[Output(feature, "value") for feature in normalized_features],
Input("indices", "value"),
)
def update_features_by_index_date(index):
...
return features_list
Now i want to dynamically change normalized_features like this:
@app.callback(
Output("normalized_features", "value") ,
Input("model", "value"),
)
def update_features(model):
...
return normalized_features
How can i use these normalized_features from callback in the first case?
Is there a way to do something like this:
@app.callback(
[Output(feature, "value") for feature in "normalized_features_from_callback"],# how should i change this line?
Input("indices", "value"),
)
def update_features_by_index_date(index):
...
return features_list
Or may be there is another approach? I have a div with Input for each feature from normalized columns and use it in further like:
@app.callback(
Output("score", "value"),
[Input(feature, "value") for feature in normalized_features],
)
def get_score(*features):
...
So every time i change “model” i want to create new “normalized_features” and recreate Output and div with input for each feature from new normalized_features