Spaces:
Runtime error
Runtime error
File size: 1,321 Bytes
719e71f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | #!/bin/bash
# Check deployment status on Hugging Face Spaces
echo "π Checking Hugging Face Space status..."
echo ""
# Check if hf remote exists
if ! git remote | grep -q "hf"; then
echo "β No 'hf' remote found. Deploy first with: make deploy"
exit 1
fi
# Get the remote URL
HF_URL=$(git remote get-url hf)
echo "π Space URL: $HF_URL"
echo ""
# Extract space name from URL
SPACE_NAME=$(echo "$HF_URL" | sed 's|https://huggingface.co/spaces/||')
echo "π Space: $SPACE_NAME"
echo ""
# Check if huggingface-cli is installed
if ! command -v huggingface-cli &> /dev/null; then
echo "β οΈ huggingface-cli not found. Install with: pip install huggingface-hub"
echo ""
echo "You can check your Space status manually at:"
echo "$HF_URL"
exit 0
fi
echo "Fetching Space information..."
echo ""
# Try to get space info (this will fail if not logged in or space doesn't exist)
if huggingface-cli repo info --repo-type space "$SPACE_NAME" 2>/dev/null; then
echo ""
echo "β
Space is accessible!"
else
echo "β οΈ Could not fetch Space info. This might mean:"
echo " - You're not logged in (run: huggingface-cli login)"
echo " - The Space doesn't exist yet"
echo " - You don't have access to this Space"
fi
echo ""
echo "π View your Space at: $HF_URL"
|