#!/bin/bash # push_to_hf.sh # Usage: bash push_to_hf.sh YOUR_HF_USERNAME YOUR_HF_TOKEN HF_USER= HF_TOKEN= SPACE_NAME=kcc-agri if [ -z "" ] || [ -z "" ]; then echo "Usage: bash push_to_hf.sh HF_USERNAME HF_TOKEN" exit 1 fi REPO_URL="https://:@huggingface.co/spaces//" echo "Pushing to https://huggingface.co/spaces//" # Install git-lfs if ! command -v git-lfs > /dev/null 2>&1; then curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash sudo apt-get install -y git-lfs fi git lfs install # Prepare README for HF cp README_HF.md README.md # Init repo if [ ! -d .git ]; then git init git remote add origin "" else git remote set-url origin "" fi # LFS tracking git lfs track "*.index" "*.parquet" "*.pkl" "bm25_chunk_*" "*.safetensors" "*.bin" # Commit and push git add . git commit -m "KCC AgriAdvisor v1 initial deployment" echo "Pushing... this takes 2-3 hours for first upload (9.5GB)" git push --force origin main echo "" echo "DONE! Live at: https://huggingface.co/spaces//" echo "Add Secrets in HF Settings: GROQ_API_KEY, GEMINI_API_KEY, SECRET_KEY, B2B_DEMO_PASSWORD"