Spaces:
Sleeping
Sleeping
lowvoltagenation commited on
Commit Β·
f2a8163
1
Parent(s): c52779e
Improve chat message handling in MayaGradioApp by implementing a new message parsing function and optimizing the display logic for better user experience.
Browse files- setup-hf-auth.sh +36 -0
setup-hf-auth.sh
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# HuggingFace Git Authentication Setup
|
| 4 |
+
echo "π Setting up HuggingFace Git Authentication..."
|
| 5 |
+
|
| 6 |
+
# Check if token is provided
|
| 7 |
+
if [ -z "$1" ]; then
|
| 8 |
+
echo "β Please provide your HuggingFace token as an argument"
|
| 9 |
+
echo "Usage: ./setup-hf-auth.sh YOUR_HF_TOKEN"
|
| 10 |
+
echo ""
|
| 11 |
+
echo "Get your token from: https://huggingface.co/settings/tokens"
|
| 12 |
+
echo "Make sure to select 'Write' permissions!"
|
| 13 |
+
exit 1
|
| 14 |
+
fi
|
| 15 |
+
|
| 16 |
+
HF_TOKEN=$1
|
| 17 |
+
USERNAME="blakeurmos"
|
| 18 |
+
REPO_URL="huggingface.co/spaces/blakeurmos/mayahq"
|
| 19 |
+
|
| 20 |
+
echo "π Updating git remote with token authentication..."
|
| 21 |
+
|
| 22 |
+
# Remove existing remote
|
| 23 |
+
git remote remove origin
|
| 24 |
+
|
| 25 |
+
# Add remote with token
|
| 26 |
+
git remote add origin https://${USERNAME}:${HF_TOKEN}@${REPO_URL}
|
| 27 |
+
|
| 28 |
+
# Set upstream
|
| 29 |
+
git branch --set-upstream-to=origin/main main
|
| 30 |
+
|
| 31 |
+
echo "β
Authentication setup complete!"
|
| 32 |
+
echo ""
|
| 33 |
+
echo "π Now you can push your changes:"
|
| 34 |
+
echo " git push origin main"
|
| 35 |
+
echo ""
|
| 36 |
+
echo "π Your token is stored in .git/config (local only)"
|