Spaces:
Sleeping
Sleeping
Update app.py
Browse files26 unmodified lines272829303132333435363738394041424344454626 unmodified linesREPO_TYPE = "space"# sys.path.append(repo_dir)cache_dir = "private_space_cache"if os.path.exists(cache_dir):for root, dirs, files in os.walk(cache_dir):for file in files:if file.endswith(".incomplete"):st.warning("🚨 Incomplete cache detected. Clearing cache for stability...")shutil.rmtree(cache_dir)break # Stop looping once cache is cleared# Download the entire space, including the fine-tuned model folderrepo_dir = snapshot_download(repo_id=REPO_ID,repo_type=REPO_TYPE,token=HF_TOKEN,cache_dir=cache_dir, #"private_space_cache"force_download=True # Forces redownload)26 unmodified lines2728293031323334353637383926 unmodified linesREPO_TYPE = "space"# sys.path.append(repo_dir)# Download the entire space, including the fine-tuned model folderrepo_dir = snapshot_download(repo_id=REPO_ID,repo_type=REPO_TYPE,token=HF_TOKEN,cache_dir="private_space_cache"force_download=True # Forces redownload)
app.py+2-9