Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,19 +24,16 @@ main.py
|
|
| 24 |
"""
|
| 25 |
|
| 26 |
|
| 27 |
-
def mainTest(
|
| 28 |
-
watermark = deep_nude_process(
|
| 29 |
-
|
| 30 |
#cv2.imwrite(outpath, watermark1)
|
| 31 |
-
return
|
| 32 |
#
|
| 33 |
|
| 34 |
|
| 35 |
-
def deep_nude_process(
|
| 36 |
-
|
| 37 |
-
dress = cv2.imread(item)
|
| 38 |
-
#dress = cv2.cvtColor(dress, cv2.COLOR_BGRA2RGBA)
|
| 39 |
-
#dress = item
|
| 40 |
h = dress.shape[0]
|
| 41 |
w = dress.shape[1]
|
| 42 |
dress = cv2.resize(dress, (512, 512), interpolation=cv2.INTER_CUBIC)
|
|
|
|
| 24 |
"""
|
| 25 |
|
| 26 |
|
| 27 |
+
def mainTest(inputpath, outpath):
|
| 28 |
+
watermark = deep_nude_process(inputpath)
|
| 29 |
+
watermark1 = cv2.cvtColor(watermark, cv2.COLOR_BGRA2RGBA)
|
| 30 |
#cv2.imwrite(outpath, watermark1)
|
| 31 |
+
return watermark1
|
| 32 |
#
|
| 33 |
|
| 34 |
|
| 35 |
+
def deep_nude_process(inputpath):
|
| 36 |
+
dress = cv2.imread(inputpath)
|
|
|
|
|
|
|
|
|
|
| 37 |
h = dress.shape[0]
|
| 38 |
w = dress.shape[1]
|
| 39 |
dress = cv2.resize(dress, (512, 512), interpolation=cv2.INTER_CUBIC)
|