MCPcopy Create free account
hub / github.com/UVA-Computer-Vision-Lab/FrameINO / on_example_click

Function on_example_click

app.py:246–265  ·  view source on GitHub ↗
(
                        input_image, resized_height, resized_width, 
                        top_left_height, top_left_width, bottom_right_height, bottom_right_width, 
                        identity_image, text_prompt, traj_lists,
                    )

Source from the content-addressed store, hash-verified

244
245
246def 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

Callers

nothing calls this directly

Calls 2

build_canvasFunction · 0.85
fn_vis_all_instance_trajFunction · 0.85

Tested by

no test coverage detected