ericup commited on
Commit
6137d3a
1 Parent(s): 567121b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import gradio as gr
2
  from cpn import CpnInterface
3
  from prep import multi_norm
@@ -7,6 +8,7 @@ from celldetection import label_cmap
7
  default_model = 'ginoro_CpnResNeXt101UNet-fbe875f1a3e5ce2c'
8
 
9
 
 
10
  def predict(filename, model=None, device=None, reduce_labels=True):
11
  global default_model
12
  assert isinstance(filename, str)
 
1
+ import spaces
2
  import gradio as gr
3
  from cpn import CpnInterface
4
  from prep import multi_norm
 
8
  default_model = 'ginoro_CpnResNeXt101UNet-fbe875f1a3e5ce2c'
9
 
10
 
11
+ @spaces.GPU
12
  def predict(filename, model=None, device=None, reduce_labels=True):
13
  global default_model
14
  assert isinstance(filename, str)