File tree Expand file tree Collapse file tree 4 files changed +565
-0
lines changed
Expand file tree Collapse file tree 4 files changed +565
-0
lines changed Original file line number Diff line number Diff line change 1+ # /// script
2+ # requires-python = ">=3.11"
3+ # dependencies = []
4+ # ///
5+
6+
7+ def main () -> None :
8+ print ("Hello from upload_to_hf.py!" )
9+
10+
11+ if __name__ == "__main__" :
12+ main ()
Original file line number Diff line number Diff line change 1+ name : Upload dataset to Hugging Face
2+ on :
3+ push :
4+ branches :
5+ - main
6+ # to run this workflow manually from the Actions tab
7+ workflow_dispatch :
8+
9+ env :
10+ PYTHON_VERSION : " 3.11"
11+ UV_VERSION : " 0.9.15"
12+
13+ jobs :
14+ upload-to-huggingface-hub :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
19+
20+ - name : Set up UV and Python
21+ uses : astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # 7.1.4
22+ with :
23+ version : ${{ env.UV_VERSION }}
24+ enable-cache : true
25+ python-version : ${{ env.PYTHON_VERSION }}
26+
27+ - name : Install hf cli
28+ run : uv tool install huggingface-hub
29+
30+ - name : Login to huggingface-hub
31+ run : hf auth login --token ${{ secrets.HUGGINGFACE_TOKEN }}
32+
33+ - name : Upload all models to Hugging Face
34+ run : ./upload_to_hf.sh
35+
You can’t perform that action at this time.
0 commit comments