orhir commited on
Commit
03d73ef
·
verified ·
1 Parent(s): c35d3ed

Update gradio_utils/utils.py

Browse files
Files changed (1) hide show
  1. gradio_utils/utils.py +4 -1
gradio_utils/utils.py CHANGED
@@ -22,6 +22,7 @@ from EdgeCape.models import *
22
 
23
 
24
  def process_img(support_image, global_state):
 
25
  global_state['images']['image_orig'] = support_image
26
  if global_state["load_example"]:
27
  global_state["load_example"] = False
@@ -234,7 +235,7 @@ def update_examples(support_img, query_image, global_state_str):
234
  )
235
  skel_image = image_draw.copy()
236
  example_state['images']['image_skel'] = skel_image
237
-
238
  return (support_img,
239
  kp_image,
240
  skel_image,
@@ -266,6 +267,7 @@ def get_closest_point_idx(pts_list, xy):
266
 
267
 
268
  def reset_skeleton(global_state):
 
269
  image = global_state["images"]["image_kp"]
270
  global_state["images"]["image_skel"] = image
271
  global_state["skeleton"] = []
@@ -275,6 +277,7 @@ def reset_skeleton(global_state):
275
 
276
 
277
  def reset_kp(global_state):
 
278
  image = global_state["images"]["image_orig"]
279
  global_state["images"]["image_kp"] = image
280
  global_state["images"]["image_skel"] = image
 
22
 
23
 
24
  def process_img(support_image, global_state):
25
+ print("process_img", global_state)
26
  global_state['images']['image_orig'] = support_image
27
  if global_state["load_example"]:
28
  global_state["load_example"] = False
 
235
  )
236
  skel_image = image_draw.copy()
237
  example_state['images']['image_skel'] = skel_image
238
+ print("update_examples", example_state)
239
  return (support_img,
240
  kp_image,
241
  skel_image,
 
267
 
268
 
269
  def reset_skeleton(global_state):
270
+ print("reset_skeleton")
271
  image = global_state["images"]["image_kp"]
272
  global_state["images"]["image_skel"] = image
273
  global_state["skeleton"] = []
 
277
 
278
 
279
  def reset_kp(global_state):
280
+ print("reset_kp")
281
  image = global_state["images"]["image_orig"]
282
  global_state["images"]["image_kp"] = image
283
  global_state["images"]["image_skel"] = image