Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,6 +13,12 @@ import shutil
|
|
| 13 |
#___________ cache issue 03_08
|
| 14 |
if os.path.exists("private_space_cache"):
|
| 15 |
shutil.rmtree("private_space_cache") # Forcefully remove corrupted cache folder
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
#____________________________________
|
| 17 |
|
| 18 |
HF_TOKEN_LLAMA = os.environ.get("HF_TOKEN_LLAMA")
|
|
|
|
| 13 |
#___________ cache issue 03_08
|
| 14 |
if os.path.exists("private_space_cache"):
|
| 15 |
shutil.rmtree("private_space_cache") # Forcefully remove corrupted cache folder
|
| 16 |
+
incomplete_files = Path(".").rglob("*.incomplete")
|
| 17 |
+
for file in incomplete_files:
|
| 18 |
+
try:
|
| 19 |
+
file.unlink()
|
| 20 |
+
except Exception as e:
|
| 21 |
+
print(f"Could not delete {file}: {e}")
|
| 22 |
#____________________________________
|
| 23 |
|
| 24 |
HF_TOKEN_LLAMA = os.environ.get("HF_TOKEN_LLAMA")
|