Spaces:
Running
on
Zero
Running
on
Zero
fix download again
Browse files
app.py
CHANGED
@@ -3,7 +3,19 @@
|
|
3 |
#
|
4 |
# This source code is licensed under the license found in the
|
5 |
# LICENSE file in the root directory of this source tree.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
|
|
|
|
|
|
|
|
|
|
7 |
import os
|
8 |
import cv2
|
9 |
import torch
|
|
|
3 |
#
|
4 |
# This source code is licensed under the license found in the
|
5 |
# LICENSE file in the root directory of this source tree.
|
6 |
+
import shutil
|
7 |
+
import os
|
8 |
+
|
9 |
+
cache_dirs = [
|
10 |
+
os.path.expanduser("~/.cache/huggingface/hub"),
|
11 |
+
os.path.expanduser("~/.cache/torch/hub"),
|
12 |
+
]
|
13 |
|
14 |
+
for cache_dir in cache_dirs:
|
15 |
+
if os.path.exists(cache_dir):
|
16 |
+
print(f"Removing cache directory: {cache_dir}")
|
17 |
+
shutil.rmtree(cache_dir)
|
18 |
+
|
19 |
import os
|
20 |
import cv2
|
21 |
import torch
|