modelscope 0.1.2

A command-line interface tool for downloading models from Modelscope, which can also be used as a library
Documentation
# modelscope


[中文](README_zh.md) | [English](README.md)

![Release](https://github.com/xgpxg/modelscope/actions/workflows/publish.yml/badge.svg)
![Crates.io](https://img.shields.io/crates/d/modelscope)

用于从Modelscope下载模型的CLI工具。

功能:

- ⬇️ 从Modelscope下载模型
- 🫏 显示进度条
- ⚡ 多线程下载
- 🔗 断点续传

支持的操作系统:

- Windows
- macOS
- Linux

## 安装


可以通过以下方式之一安装:

- 使用Cargo安装

```shell
cargo install modelscope
```

- 使用预编译的包
  [发布页面]https://github.com/xgpxg/modelscope/releases 下载适合你的操作系统的包,然后解压。

## 使用方式:


```shell
modelscope download -m <MODEL_ID> -s <SAVE_DIR>
```

![img.png](screenshot.png)

## 命令:


```shell
Usage: modelscope <COMMAND>

Commands:
  download  Download model
  login     Login to modelscope use your token
  logout    Logout
  list      List all local models
  help      Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version
```

## 在lib中使用


添加依赖:

```shell
cargo add modelscope
```

示例:

```rust
use modelscope::ModelScope;

#[tokio::main]

async fn main() -> anyhow::Result<()> {
    let model_id = "Qwen/Qwen3-0.6B";
    let save_dir = "./data";
    ModelScope::download(model_id, save_dir).await?;

    Ok(())
}
```