eyad-silx commited on
Commit
1d0d654
·
verified ·
1 Parent(s): 4085190

Upload podflow/upart.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. podflow/upart.sh +16 -0
podflow/upart.sh ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ T=$(cat /root/.hftok)
4
+ F=$(ls /root/models/chal-calib/*.gguf | head -1)
5
+ curl -sL -H "Authorization: Bearer $T" -T "$F" \
6
+ "https://transfer.huggingface.co/repos/eyad-silx/progress/podflow-chal-calib.gguf" 2>/dev/null \
7
+ || /root/ingot/.venv/bin/python - <<'PY'
8
+ from huggingface_hub import HfApi
9
+ tok = open("/root/.hftok").read().strip()
10
+ import glob
11
+ f = glob.glob("/root/models/chal-calib/*.gguf")[0]
12
+ HfApi(token=tok).upload_file(path_or_fileobj=f, path_in_repo="podflow/chal-calib.gguf",
13
+ repo_id="eyad-silx/progress", repo_type="model")
14
+ print("PYUPLOAD_OK")
15
+ PY
16
+ echo UPLOAD_DONE