Spaces:
Paused
Paused
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -542,8 +542,10 @@ def _mf_dl_and_upload(job_id, dl_url, fname, base_status):
|
|
| 542 |
except Exception:
|
| 543 |
pass
|
| 544 |
time.sleep(1)
|
|
|
|
|
|
|
| 545 |
if proc.returncode!=0 or not os.path.exists(tmp_path) or os.path.getsize(tmp_path)==0:
|
| 546 |
-
jobs[job_id]["status"]=f"{base_status} → Failed
|
| 547 |
try: shutil.rmtree(tmp_base)
|
| 548 |
except: pass
|
| 549 |
return False
|
|
|
|
| 542 |
except Exception:
|
| 543 |
pass
|
| 544 |
time.sleep(1)
|
| 545 |
+
try: err=(proc.stderr.read() or b"")[:400].decode("utf-8","ignore")
|
| 546 |
+
except Exception: err=""
|
| 547 |
if proc.returncode!=0 or not os.path.exists(tmp_path) or os.path.getsize(tmp_path)==0:
|
| 548 |
+
jobs[job_id]["status"]=f"{base_status} → Failed({proc.returncode}) {err.strip()[-160:]}"
|
| 549 |
try: shutil.rmtree(tmp_base)
|
| 550 |
except: pass
|
| 551 |
return False
|