HarborYuan commited on
Commit
66a3db3
1 Parent(s): 976cbed

add spaces lib

Browse files
Files changed (1) hide show
  1. main.py +3 -0
main.py CHANGED
@@ -17,6 +17,8 @@ from mmdet.datasets.coco_panoptic import CocoPanopticDataset
17
 
18
  from PIL import ImageDraw
19
 
 
 
20
  IMG_SIZE = 1024
21
 
22
  TITLE = "<center><strong><font size='8'>OMG-Seg: Is One Model Good Enough For All Segmentation?<font></strong></center>"
@@ -107,6 +109,7 @@ def get_points_with_draw(image, img_state, evt: gr.SelectData):
107
  return image
108
 
109
 
 
110
  def segment_point(image, img_state, mode):
111
  output_img = img_state.img
112
  h, w = output_img.shape[:2]
 
17
 
18
  from PIL import ImageDraw
19
 
20
+ import spaces
21
+
22
  IMG_SIZE = 1024
23
 
24
  TITLE = "<center><strong><font size='8'>OMG-Seg: Is One Model Good Enough For All Segmentation?<font></strong></center>"
 
109
  return image
110
 
111
 
112
+ @spaces.GPU
113
  def segment_point(image, img_state, mode):
114
  output_img = img_state.img
115
  h, w = output_img.shape[:2]