MCPcopy Create free account
hub / github.com/OpenGVLab/DragGAN / on_undo

Function on_undo

gradio_app.py:106–116  ·  view source on GitHub ↗
(points, image, state, size)

Source from the content-addressed store, hash-verified

104
105
106def on_undo(points, image, state, size):
107 image = state['img']
108
109 if len(points['target']) < len(points['handle']):
110 points['handle'] = points['handle'][:-1]
111 else:
112 points['handle'] = points['handle'][:-1]
113 points['target'] = points['target'][:-1]
114
115 image = add_points_to_image(image, points, size=SIZE_TO_CLICK_SIZE[size])
116 return points, image, False
117
118
119def on_change_model(selected, model):

Callers

nothing calls this directly

Calls 1

add_points_to_imageFunction · 0.70

Tested by

no test coverage detected