Spaces:
Running
Running
Update backend/app.py
Browse files- backend/app.py +5 -2
backend/app.py
CHANGED
|
@@ -1,13 +1,16 @@
|
|
| 1 |
import os
|
| 2 |
import shutil
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
os.environ["HF_HOME"] = "/tmp/huggingface"
|
| 4 |
os.environ["HUGGINGFACE_HUB_CACHE"] = "/tmp/huggingface"
|
| 5 |
os.environ["TORCH_HOME"] = "/tmp/torch"
|
| 6 |
os.environ["MPLCONFIGDIR"] = "/tmp/matplotlib"
|
| 7 |
os.environ["YOLO_CONFIG_DIR"] = "/tmp/Ultralytics"
|
| 8 |
|
| 9 |
-
for d in ["/tmp/huggingface", "/tmp/Ultralytics", "/tmp/matplotlib", "/tmp/torch", "/root/.cache"]:
|
| 10 |
-
shutil.rmtree(d, ignore_errors=True)
|
| 11 |
|
| 12 |
from huggingface_hub import login
|
| 13 |
|
|
|
|
| 1 |
import os
|
| 2 |
import shutil
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
for d in ["/tmp/huggingface", "/tmp/Ultralytics", "/tmp/matplotlib", "/tmp/torch", "/root/.cache"]:
|
| 6 |
+
shutil.rmtree(d, ignore_errors=True)
|
| 7 |
+
|
| 8 |
os.environ["HF_HOME"] = "/tmp/huggingface"
|
| 9 |
os.environ["HUGGINGFACE_HUB_CACHE"] = "/tmp/huggingface"
|
| 10 |
os.environ["TORCH_HOME"] = "/tmp/torch"
|
| 11 |
os.environ["MPLCONFIGDIR"] = "/tmp/matplotlib"
|
| 12 |
os.environ["YOLO_CONFIG_DIR"] = "/tmp/Ultralytics"
|
| 13 |
|
|
|
|
|
|
|
| 14 |
|
| 15 |
from huggingface_hub import login
|
| 16 |
|