Skip to content

Commit 97eafda

Browse files
committed
fix: download path
1 parent d28a6bd commit 97eafda

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/lib.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,16 @@ struct RepoFile {
4444
r#type: String,
4545
}
4646

47-
const BAR_STYLE: &str = "{msg:<30} {bar} {decimal_bytes:<10} / {decimal_total_bytes:<10} {decimal_bytes_per_sec:<10} {percent:<3}% {eta_precise}";
47+
const BAR_STYLE: &str = "{msg:<30} {bar} {decimal_bytes:<10} / {decimal_total_bytes:<10} {decimal_bytes_per_sec:<12} {percent:<3}% {eta_precise}";
4848

4949
impl ModelScope {
5050
pub async fn download(model_id: &str, save_dir: impl Into<PathBuf>) -> anyhow::Result<()> {
51-
let save_dir = save_dir.into();
51+
let save_dir = save_dir.into().join(model_id);
52+
53+
println!();
54+
println!("Downloading model {} to: {}", model_id, save_dir.display());
55+
println!();
5256

53-
println!("downloading model {} to: {}", model_id, save_dir.display());
5457
fs::create_dir_all(&save_dir)?;
5558

5659
let files_url = FILES_URL.replace("<model_id>", model_id);

0 commit comments

Comments
 (0)