Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -425,6 +425,9 @@ def sync_results_from_hub_to_local() -> None:
|
|
| 425 |
if not RESULTS_REPO_ID:
|
| 426 |
return
|
| 427 |
sync_root = APP_DIR / ".hf_results_sync_cache"
|
|
|
|
|
|
|
|
|
|
| 428 |
try:
|
| 429 |
snapshot_download(
|
| 430 |
repo_id=RESULTS_REPO_ID,
|
|
|
|
| 425 |
if not RESULTS_REPO_ID:
|
| 426 |
return
|
| 427 |
sync_root = APP_DIR / ".hf_results_sync_cache"
|
| 428 |
+
# 先清空同步缓存,避免远程已删除文件在本地残留导致“误判已评估”
|
| 429 |
+
if sync_root.exists():
|
| 430 |
+
shutil.rmtree(sync_root)
|
| 431 |
try:
|
| 432 |
snapshot_download(
|
| 433 |
repo_id=RESULTS_REPO_ID,
|