-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweights_dl.sh
More file actions
executable file
·35 lines (28 loc) · 1.03 KB
/
Copy pathweights_dl.sh
File metadata and controls
executable file
·35 lines (28 loc) · 1.03 KB
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
#!/usr/bin/env bash
set -e
# Script to download weight files from Google Drive
# Folder ID: 1Mj7TE2IH8EtHBIswu8TJ9tjBfzYG2Pv2
FOLDER_ID="1Mj7TE2IH8EtHBIswu8TJ9tjBfzYG2Pv2"
OUTPUT_DIR="${1:-.}"
# Check if gdown is installed
if ! command -v gdown &> /dev/null; then
echo "gdown is not installed. Installing..."
pip install gdown
fi
# Create output directory
mkdir -p "${OUTPUT_DIR}"
echo "Downloading weight files from Google Drive..."
echo "Folder ID: ${FOLDER_ID}"
echo "Output directory: ${OUTPUT_DIR}"
# Download Google Drive folder
# Try multiple methods as syntax may differ depending on gdown version
if gdown --folder "https://drive.google.com/drive/folders/${FOLDER_ID}" -O "${OUTPUT_DIR}" 2>/dev/null; then
echo "Download completed!"
elif gdown --folder "${FOLDER_ID}" -O "${OUTPUT_DIR}" 2>/dev/null; then
echo "Download completed!"
else
echo "Error: Failed to download folder."
echo "Please check gdown version: gdown --version"
echo "To upgrade to latest version: pip install --upgrade gdown"
exit 1
fi