#!/bin/bash set -e # Build the app to ensure everything is correct npm run build # Add HF remote if it doesn't exist # Token should be provided via HF_TOKEN environment variable HF_REPO="https://harvesthealth:$HF_TOKEN@huggingface.co/spaces/harvesthealth/Chat_App" if ! git remote | grep -q "hf"; then git remote add hf "$HF_REPO" fi # Push to HF echo "Pushing to Hugging Face Spaces..." git push hf main --force echo "Monitoring build logs..." # Using curl as requested by the user curl -N -H "Authorization: Bearer $HF_TOKEN" "https://huggingface.co/api/spaces/harvesthealth/Chat_App/logs/build" | head -n 50