phanny commited on
Commit
7535bf6
·
1 Parent(s): f34a036

fix huggingface

Browse files
Files changed (1) hide show
  1. scripts/push_to_hf.sh +4 -18
scripts/push_to_hf.sh CHANGED
@@ -1,20 +1,6 @@
1
  #!/usr/bin/env bash
2
- # Push current branch to Hugging Face Spaces (main), removing binary xlsx from history.
3
- # HF rejects binary files; student-version history contains the xlsx, so we push a cleaned branch.
4
  set -e
5
- BRANCH="${1:-student-version}"
6
- REMOTE="${2:-huggingface}"
7
- HF_BRANCH="${3:-hf-push}"
8
-
9
- echo "Creating $HF_BRANCH from $BRANCH, stripping data/National_Directory_SU_2024.xlsx from history..."
10
- git checkout -B "$HF_BRANCH" "$BRANCH"
11
- FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch data/National_Directory_SU_2024.xlsx' --prune-empty HEAD
12
-
13
- echo "Pushing $HF_BRANCH to $REMOTE main (force)..."
14
- git push "$REMOTE" "$HF_BRANCH:main" --force
15
-
16
- echo "Switching back to $BRANCH and deleting $HF_BRANCH..."
17
- git checkout "$BRANCH"
18
- git branch -D "$HF_BRANCH"
19
-
20
- echo "Done. Space updated: https://huggingface.co/spaces/phanny/6.C395-chatbot"
 
1
  #!/usr/bin/env bash
2
+ # Push student-version to Hugging Face Space (updates main on the Space).
3
+ # Binary xlsx was removed from history, so a normal push works.
4
  set -e
5
+ git push huggingface student-version:main
6
+ echo "Done. https://huggingface.co/spaces/phanny/6.C395-chatbot"