Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,15 +1,17 @@
|
|
| 1 |
import spaces
|
| 2 |
import gradio as gr
|
| 3 |
-
from cpn import CpnInterface
|
| 4 |
-
from prep import multi_norm
|
| 5 |
from util import imread, imsave, get_examples
|
| 6 |
-
|
| 7 |
|
| 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)
|
| 15 |
print(dict(
|
|
|
|
| 1 |
import spaces
|
| 2 |
import gradio as gr
|
|
|
|
|
|
|
| 3 |
from util import imread, imsave, get_examples
|
| 4 |
+
|
| 5 |
|
| 6 |
default_model = 'ginoro_CpnResNeXt101UNet-fbe875f1a3e5ce2c'
|
| 7 |
|
| 8 |
|
| 9 |
@spaces.GPU
|
| 10 |
def predict(filename, model=None, device=None, reduce_labels=True):
|
| 11 |
+
from cpn import CpnInterface
|
| 12 |
+
from prep import multi_norm
|
| 13 |
+
from celldetection import label_cmap
|
| 14 |
+
|
| 15 |
global default_model
|
| 16 |
assert isinstance(filename, str)
|
| 17 |
print(dict(
|