'Bokeh on change didn't update

I have a code with Bokeh. When the radio_button_group was changed, the selection in update function is updated but not in the radio_button_group.active when I clicked on button_result. Thank you for your assistance

def update ():
    selection = radio_button_group.active
    return selection

Labels=["Normal","Abnormal"]

radio_button_group = RadioButtonGroup(labels=Labels, active=0)

radio_button_group.on_change("active", lambda attr,old,new: update ())

button_result =Button(label='Check Result')
button_result.on_click(partial(result_checker,radio_button_group.active))


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source