Spaces:
Sleeping
Sleeping
Ahsen Khaliq
commited on
Commit
•
be469ef
1
Parent(s):
03898c7
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def infer(img,mask,option):
|
|
16 |
hsize = int((float(img.size[1])*float(wpercent)))
|
17 |
img = img.resize((basewidth,hsize), Image.ANTIALIAS)
|
18 |
img.save("./data/data.png")
|
19 |
-
if option == "automatic (U2net)"
|
20 |
result = model.Segmentation(
|
21 |
images=[cv2.cvtColor(np.array(img), cv2.COLOR_RGB2BGR)],
|
22 |
paths=None,
|
|
|
16 |
hsize = int((float(img.size[1])*float(wpercent)))
|
17 |
img = img.resize((basewidth,hsize), Image.ANTIALIAS)
|
18 |
img.save("./data/data.png")
|
19 |
+
if option == "automatic (U2net)":
|
20 |
result = model.Segmentation(
|
21 |
images=[cv2.cvtColor(np.array(img), cv2.COLOR_RGB2BGR)],
|
22 |
paths=None,
|