Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,7 +37,12 @@ def robust_download(repo_id: str, filename: str, dest: str, max_attempts: int =
|
|
| 37 |
for attempt in range(1, max_attempts + 1):
|
| 38 |
try:
|
| 39 |
print(f"[robust_download] Attempt {attempt}: hf_hub_download...")
|
| 40 |
-
cached_path = hf_hub_download(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
print("[robust_download] hf_hub_download returned:", cached_path)
|
| 42 |
if os.path.abspath(cached_path) != os.path.abspath(dest):
|
| 43 |
shutil.copy2(cached_path, dest)
|
|
|
|
| 37 |
for attempt in range(1, max_attempts + 1):
|
| 38 |
try:
|
| 39 |
print(f"[robust_download] Attempt {attempt}: hf_hub_download...")
|
| 40 |
+
cached_path = hf_hub_download(
|
| 41 |
+
repo_id=repo_id,
|
| 42 |
+
filename=filename,
|
| 43 |
+
local_dir=MODEL_DIR,
|
| 44 |
+
local_dir_use_symlinks=False
|
| 45 |
+
)
|
| 46 |
print("[robust_download] hf_hub_download returned:", cached_path)
|
| 47 |
if os.path.abspath(cached_path) != os.path.abspath(dest):
|
| 48 |
shutil.copy2(cached_path, dest)
|