Spaces:
Running
Running
Commit
·
46cde7f
1
Parent(s):
a0a768e
Update app.py
Browse files
app.py
CHANGED
|
@@ -138,7 +138,7 @@ model = ModelManager(
|
|
| 138 |
device=device,
|
| 139 |
)
|
| 140 |
|
| 141 |
-
image_type = 'pil' # filepath'
|
| 142 |
def predict(input):
|
| 143 |
if image_type == 'filepath':
|
| 144 |
# input: {'image': '/tmp/tmp8mn9xw93.png', 'mask': '/tmp/tmpn5ars4te.png'}
|
|
@@ -152,7 +152,6 @@ def predict(input):
|
|
| 152 |
mask_pil = input['mask']
|
| 153 |
image = np.array(image_pil)
|
| 154 |
mask = np.array(mask_pil.convert("L"))
|
| 155 |
-
# output = mask_pil
|
| 156 |
output = model_process(image, mask)
|
| 157 |
return output
|
| 158 |
|
|
|
|
| 138 |
device=device,
|
| 139 |
)
|
| 140 |
|
| 141 |
+
image_type = 'pil' # filepath'
|
| 142 |
def predict(input):
|
| 143 |
if image_type == 'filepath':
|
| 144 |
# input: {'image': '/tmp/tmp8mn9xw93.png', 'mask': '/tmp/tmpn5ars4te.png'}
|
|
|
|
| 152 |
mask_pil = input['mask']
|
| 153 |
image = np.array(image_pil)
|
| 154 |
mask = np.array(mask_pil.convert("L"))
|
|
|
|
| 155 |
output = model_process(image, mask)
|
| 156 |
return output
|
| 157 |
|