huggingface login confition
This commit is contained in:
parent
9c222af667
commit
3d05ac9a93
1 changed files with 7 additions and 1 deletions
|
|
@ -57,11 +57,17 @@
|
||||||
pkgs.zip
|
pkgs.zip
|
||||||
];
|
];
|
||||||
text = ''
|
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
|
cd ~/.local/share
|
||||||
timestamp=$(date +%Y-%m-%d_%H-%M)
|
timestamp=$(date +%Y-%m-%d_%H-%M)
|
||||||
echo "$timestamp"
|
echo "$timestamp"
|
||||||
zip -r "Terraria_$timestamp.zip" Terraria/
|
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"
|
huggingface-cli upload --repo-type dataset osbm/terraria-backups "Terraria_$timestamp.zip" "Terraria_$timestamp.zip"
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue