jens commited on
Commit
d718048
·
1 Parent(s): ae29f3e
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -66,13 +66,13 @@ with block:
66
  return input_image, point_coords_empty(), point_labels_empty(), None, []
67
  reset_btn.click(on_reset_btn_click, [input_image], [input_image, point_coords, point_labels], queue=False)
68
 
69
- def on_input_image_upload(input_image):
70
- print("encoding")
71
- # encode image on upload
72
- sam.encode(input_image)
73
- print("encoding done")
74
- return input_image, point_coords_empty(), point_labels_empty(), None
75
- input_image.upload(on_input_image_upload, [input_image], [input_image, point_coords, point_labels], queue=False)
76
 
77
  # event - set coords
78
  def on_prompt_image_select(input_image, prompt_image, point_coords, point_labels, point_label_radio, evt: gr.SelectData):
 
66
  return input_image, point_coords_empty(), point_labels_empty(), None, []
67
  reset_btn.click(on_reset_btn_click, [input_image], [input_image, point_coords, point_labels], queue=False)
68
 
69
+ #def on_input_image_upload(input_image):
70
+ # print("encoding")
71
+ # # encode image on upload
72
+ ## sam.encode(input_image)
73
+ # print("encoding done")
74
+ # return input_image, point_coords_empty(), point_labels_empty(), None
75
+ #input_image.upload(on_input_image_upload, [input_image], [input_image, point_coords, point_labels], queue=False)
76
 
77
  # event - set coords
78
  def on_prompt_image_select(input_image, prompt_image, point_coords, point_labels, point_label_radio, evt: gr.SelectData):