Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,9 +32,11 @@ from u2net import U2NETP
|
|
| 32 |
# ---------------------
|
| 33 |
# Create a cache folder for models
|
| 34 |
# ---------------------
|
|
|
|
|
|
|
|
|
|
| 35 |
if os.path.exists(CACHE_DIR):
|
| 36 |
shutil.rmtree(CACHE_DIR)
|
| 37 |
-
CACHE_DIR = os.path.join(os.path.dirname(__file__), ".cache")
|
| 38 |
os.makedirs(CACHE_DIR, exist_ok=True)
|
| 39 |
|
| 40 |
# ---------------------
|
|
|
|
| 32 |
# ---------------------
|
| 33 |
# Create a cache folder for models
|
| 34 |
# ---------------------
|
| 35 |
+
CACHE_DIR = os.path.join(os.path.dirname(__file__), ".cache")
|
| 36 |
+
|
| 37 |
+
# Now you can check and remove it safely
|
| 38 |
if os.path.exists(CACHE_DIR):
|
| 39 |
shutil.rmtree(CACHE_DIR)
|
|
|
|
| 40 |
os.makedirs(CACHE_DIR, exist_ok=True)
|
| 41 |
|
| 42 |
# ---------------------
|