#!/bin/bash # Check if the token.json file exists if [ ! -f "token.json" ]; then echo "Error: token.json file not found. Please ensure it exists in the current directory." exit 1 fi # Login to Hugging Face huggingface-cli login --token $HF_TOKEN # Create Space if it doesn't exist and upload files huggingface-cli repo create igorai_demo --type space --space_sdk docker -y || true # Upload current branch as main to Hugging Face huggingface-cli upload igorai_demo . --repo-type space --revision main --commit-message "Update from brunch"