Spaces:
Runtime error
Runtime error
Update upload.sh
Browse files
upload.sh
CHANGED
@@ -7,17 +7,20 @@ if [ -z "$sc4sc_token" ]; then
|
|
7 |
exit 1
|
8 |
fi
|
9 |
|
|
|
|
|
|
|
10 |
# Install huggingface_hub CLI if needed
|
11 |
if ! command -v huggingface-cli &> /dev/null; then
|
12 |
echo "π§ Installing huggingface_hub CLI..."
|
13 |
-
pip install huggingface_hub[cli]
|
14 |
fi
|
15 |
|
16 |
-
# Secure login
|
17 |
echo "π Logging into Hugging Face CLI..."
|
18 |
huggingface-cli login --token <<< "$sc4sc_token" > /dev/null
|
19 |
|
20 |
-
# Upload
|
21 |
echo "π€ Uploading to Hugging Face Space: sc4sc/editor"
|
22 |
huggingface-cli upload sc4sc/editor . --repo-type=space --include="*" --yes
|
23 |
|
|
|
7 |
exit 1
|
8 |
fi
|
9 |
|
10 |
+
# Ensure user bin is on the path
|
11 |
+
export PATH="$HOME/.local/bin:$PATH"
|
12 |
+
|
13 |
# Install huggingface_hub CLI if needed
|
14 |
if ! command -v huggingface-cli &> /dev/null; then
|
15 |
echo "π§ Installing huggingface_hub CLI..."
|
16 |
+
pip install --user "huggingface_hub[cli]"
|
17 |
fi
|
18 |
|
19 |
+
# Secure login
|
20 |
echo "π Logging into Hugging Face CLI..."
|
21 |
huggingface-cli login --token <<< "$sc4sc_token" > /dev/null
|
22 |
|
23 |
+
# Upload
|
24 |
echo "π€ Uploading to Hugging Face Space: sc4sc/editor"
|
25 |
huggingface-cli upload sc4sc/editor . --repo-type=space --include="*" --yes
|
26 |
|