xinjie.wang commited on
Commit
64fae85
·
1 Parent(s): 8a0efc0
Files changed (2) hide show
  1. app.py +2 -2
  2. common.py +2 -2
app.py CHANGED
@@ -44,7 +44,7 @@ with gr.Blocks(
44
 
45
  image_css = """
46
  <style>
47
- #img1 img {
48
  object-fit: contain !important;
49
  width: 100% !important;
50
  height: 100% !important;
@@ -58,7 +58,7 @@ with gr.Blocks(
58
  image_mode="RGBA",
59
  type="pil",
60
  height=300,
61
- elem_id="img1",
62
  )
63
  gr.Markdown(
64
  """
 
44
 
45
  image_css = """
46
  <style>
47
+ #img-fit img {
48
  object-fit: contain !important;
49
  width: 100% !important;
50
  height: 100% !important;
 
58
  image_mode="RGBA",
59
  type="pil",
60
  height=300,
61
+ elem_id="img-fit",
62
  )
63
  gr.Markdown(
64
  """
common.py CHANGED
@@ -304,7 +304,7 @@ def get_seed(randomize_seed: bool, seed: int, max_seed: int = MAX_SEED) -> int:
304
  return np.random.randint(0, max_seed) if randomize_seed else seed
305
 
306
 
307
- @spaces.GPU
308
  def select_point(
309
  image: np.ndarray,
310
  sel_pix: list,
@@ -333,7 +333,7 @@ def select_point(
333
  thickness=10,
334
  )
335
 
336
- torch.cuda.empty_cache()
337
 
338
  return (image, masks), seg_image
339
 
 
304
  return np.random.randint(0, max_seed) if randomize_seed else seed
305
 
306
 
307
+ # @spaces.GPU
308
  def select_point(
309
  image: np.ndarray,
310
  sel_pix: list,
 
333
  thickness=10,
334
  )
335
 
336
+ # torch.cuda.empty_cache()
337
 
338
  return (image, masks), seg_image
339