huggingface login confition

This commit is contained in:
Osman Faruk Bayram 2025-02-24 21:49:25 +03:00
parent 9c222af667
commit 3d05ac9a93

View file

@ -57,11 +57,17 @@
pkgs.zip
];
text = ''
# check if logged in to huggingface
# hugingface-cli whoami == "Not logged in" means not logged in
if [ "$(huggingface-cli whoami)" == "Not logged in" ]; then
echo "Please log in to huggingface"
exit 1
fi
cd ~/.local/share
timestamp=$(date +%Y-%m-%d_%H-%M)
echo "$timestamp"
zip -r "Terraria_$timestamp.zip" Terraria/
echo huggingface-cli whoami
huggingface-cli upload --repo-type dataset osbm/terraria-backups "Terraria_$timestamp.zip" "Terraria_$timestamp.zip"
'';
})