Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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)
|