xinjie.wang commited on
Commit
779c416
·
1 Parent(s): b2b097d
Files changed (2) hide show
  1. app.py +1 -7
  2. common.py +0 -2
app.py CHANGED
@@ -44,17 +44,11 @@ with gr.Blocks(
44
 
45
  image_css = """
46
  <style>
47
- #img-fit img {
48
  object-fit: contain !important;
49
  width: 100% !important;
50
  height: 100% !important;
51
  }
52
- #img-fit {
53
- display: flex;
54
- align-items: center;
55
- justify-content: center;
56
- overflow: hidden !important;
57
- }
58
  </style>
59
  """
60
  gr.HTML(image_css)
 
44
 
45
  image_css = """
46
  <style>
47
+ #img-fit .dev img {
48
  object-fit: contain !important;
49
  width: 100% !important;
50
  height: 100% !important;
51
  }
 
 
 
 
 
 
52
  </style>
53
  """
54
  gr.HTML(image_css)
common.py CHANGED
@@ -319,8 +319,6 @@ def select_point(
319
  sel_pix.append((evt.index, 1)) # default foreground_point
320
 
321
  masks = SAM_PREDICTOR.generate_masks(image, sel_pix)
322
- print("sel_pix", sel_pix)
323
- print("masks", masks)
324
  seg_image = SAM_PREDICTOR.get_segmented_image(image, masks)
325
 
326
  for point, label in sel_pix:
 
319
  sel_pix.append((evt.index, 1)) # default foreground_point
320
 
321
  masks = SAM_PREDICTOR.generate_masks(image, sel_pix)
 
 
322
  seg_image = SAM_PREDICTOR.get_segmented_image(image, masks)
323
 
324
  for point, label in sel_pix: