Spaces:
Sleeping
Sleeping
static folder creation line added
Browse files- preprocess.py +2 -1
preprocess.py
CHANGED
@@ -34,7 +34,8 @@ def save_output(image_name, output_name, pred, d_dir, type):
|
|
34 |
|
35 |
# Remove Background From Image (Generate Mask, and Final Results)
|
36 |
def removeBg(imagePath):
|
37 |
-
os.
|
|
|
38 |
inputs_dir = os.path.join(currentDir, 'static/inputs/')
|
39 |
results_dir = os.path.join(currentDir, 'static/results/')
|
40 |
masks_dir = os.path.join(currentDir, 'static/masks/')
|
|
|
34 |
|
35 |
# Remove Background From Image (Generate Mask, and Final Results)
|
36 |
def removeBg(imagePath):
|
37 |
+
if not os.path.exists('static'):
|
38 |
+
os.mkdir('static')
|
39 |
inputs_dir = os.path.join(currentDir, 'static/inputs/')
|
40 |
results_dir = os.path.join(currentDir, 'static/results/')
|
41 |
masks_dir = os.path.join(currentDir, 'static/masks/')
|