Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
·
00a9bd1
1
Parent(s):
be469ef
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,10 +11,9 @@ os.mkdir("data")
|
|
| 11 |
os.mkdir("dataout")
|
| 12 |
model = hub.Module(name='U2Net')
|
| 13 |
def infer(img,mask,option):
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
img = img.resize((basewidth,hsize), Image.ANTIALIAS)
|
| 18 |
img.save("./data/data.png")
|
| 19 |
if option == "automatic (U2net)":
|
| 20 |
result = model.Segmentation(
|
|
|
|
| 11 |
os.mkdir("dataout")
|
| 12 |
model = hub.Module(name='U2Net')
|
| 13 |
def infer(img,mask,option):
|
| 14 |
+
img = img.resize((600,600)) # image resizing
|
| 15 |
+
|
| 16 |
+
mask = mask.resize((600,600))
|
|
|
|
| 17 |
img.save("./data/data.png")
|
| 18 |
if option == "automatic (U2net)":
|
| 19 |
result = model.Segmentation(
|