(
input_image, resized_height, resized_width,
top_left_height, top_left_width, bottom_right_height, bottom_right_width,
identity_image, text_prompt, traj_lists,
)
| 244 | |
| 245 | |
| 246 | def on_example_click( |
| 247 | input_image, resized_height, resized_width, |
| 248 | top_left_height, top_left_width, bottom_right_height, bottom_right_width, |
| 249 | identity_image, text_prompt, traj_lists, |
| 250 | ): |
| 251 | |
| 252 | # Convert |
| 253 | traj_lists = ast.literal_eval(traj_lists) |
| 254 | # Note: No need for the rest like resized_width and resized_height, because these will be replaced in function |
| 255 | |
| 256 | |
| 257 | # Sequentially build the canvas (We don't accept the empty traj_lists & traj_instance_idx returned by build_canvas) |
| 258 | visual_canvas, initial_visual_canvas, inference_canvas, _, _ = build_canvas(input_image, resized_height, resized_width, top_left_height, top_left_width, bottom_right_height, bottom_right_width) |
| 259 | |
| 260 | |
| 261 | # Sequentially load the Trajs of all instances on the canvas |
| 262 | visual_canvas, traj_instance_idx = fn_vis_all_instance_traj(visual_canvas, traj_lists) |
| 263 | |
| 264 | |
| 265 | return visual_canvas, initial_visual_canvas, inference_canvas, traj_instance_idx |
| 266 | |
| 267 | |
| 268 |
nothing calls this directly
no test coverage detected