Spaces:
Runtime error
Runtime error
Commit
·
3f4ba22
1
Parent(s):
b1502ab
Update app.py
Browse files
app.py
CHANGED
@@ -20,9 +20,10 @@ def inference():
|
|
20 |
image = cv2.imread(secure_filename(file_name))
|
21 |
w,h = image.shape[1],image.shape[0]
|
22 |
os.system("uname -a")
|
23 |
-
output = remove(image) # remove background
|
24 |
-
|
25 |
-
cv2.
|
|
|
26 |
print(secure_filename(file.filename).split('.'))
|
27 |
os.system("ls -l")
|
28 |
return send_file(secure_filename(file.filename).split('.')[0]+'.png',mimetype='image/png')
|
|
|
20 |
image = cv2.imread(secure_filename(file_name))
|
21 |
w,h = image.shape[1],image.shape[0]
|
22 |
os.system("uname -a")
|
23 |
+
#output = remove(image) # remove background
|
24 |
+
os.system('backgroundremover -i'+'{name}'.format(name= secure_filename(file.filename)) + ' -m "u2net_human_seg" -o {name}'.format(name= secure_filename(file.filename)))
|
25 |
+
#output = cv2.resize(output,(int(w*.79),int(h*.79)))
|
26 |
+
#cv2.imwrite(secure_filename(file.filename).split('.')[0]+'.png',output)
|
27 |
print(secure_filename(file.filename).split('.'))
|
28 |
os.system("ls -l")
|
29 |
return send_file(secure_filename(file.filename).split('.')[0]+'.png',mimetype='image/png')
|