Function to start remove mask mode. 1. Preprocess mask info from last state 2. Change editing state to remove_mask 3. Set curr image with points and mask
(global_state, image)
| 744 | gr.Image.update(value=image_draw, interactive=True)) |
| 745 | |
| 746 | def on_click_remove_draw(global_state, image): |
| 747 | """Function to start remove mask mode. |
| 748 | 1. Preprocess mask info from last state |
| 749 | 2. Change editing state to remove_mask |
| 750 | 3. Set curr image with points and mask |
| 751 | """ |
| 752 | global_state = preprocess_mask_info(global_state, image) |
| 753 | global_state['edinting_state'] = 'remove_mask' |
| 754 | image_raw = global_state['images']['image_raw'] |
| 755 | image_draw = update_image_draw(image_raw, global_state['points'], |
| 756 | global_state['mask'], True, |
| 757 | global_state) |
| 758 | return (global_state, |
| 759 | gr.Image.update(value=image_draw, interactive=True)) |
| 760 | |
| 761 | enable_add_mask.click(on_click_enable_draw, |
| 762 | inputs=[global_state, form_image], |
nothing calls this directly
no test coverage detected