deepyuna commited on
Commit
996c4dd
·
verified ·
1 Parent(s): ed02ac5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -27,20 +27,13 @@ REPO_ID = f"{USER_NAME}/{PRIVATE_SPACE_NAME}"
27
  REPO_TYPE = "space"
28
 
29
  # sys.path.append(repo_dir)
30
- cache_dir = "private_space_cache"
31
- if os.path.exists(cache_dir):
32
- for root, dirs, files in os.walk(cache_dir):
33
- for file in files:
34
- if file.endswith(".incomplete"):
35
- st.warning("🚨 Incomplete cache detected. Clearing cache for stability...")
36
- shutil.rmtree(cache_dir)
37
- break # Stop looping once cache is cleared
38
  # Download the entire space, including the fine-tuned model folder
39
  repo_dir = snapshot_download(
40
  repo_id=REPO_ID,
41
  repo_type=REPO_TYPE,
42
  token=HF_TOKEN,
43
- cache_dir=cache_dir, #"private_space_cache"
44
  force_download=True # Forces redownload
45
  )
46
 
 
27
  REPO_TYPE = "space"
28
 
29
  # sys.path.append(repo_dir)
30
+
 
 
 
 
 
 
 
31
  # Download the entire space, including the fine-tuned model folder
32
  repo_dir = snapshot_download(
33
  repo_id=REPO_ID,
34
  repo_type=REPO_TYPE,
35
  token=HF_TOKEN,
36
+ cache_dir="private_space_cache"
37
  force_download=True # Forces redownload
38
  )
39