File size: 1,317 Bytes
f3f2a15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# load

This feature is similar to [gr.load](https://www.gradio.app/docs/gradio/load). Allow users to Construct a demo from a [ModelScope Studio](https://modelscope.cn/studios) repo.

## How to Use

### Basic Usage

```python
import modelscope_studio as mgr
demo = mgr.load("modelscope/modelscope-studio")
demo.launch()
```

### With Access Token

Use the access token to load a private ModelScope Studio repo. Find your sdk token here: https://modelscope.cn/my/myaccesstoken.

```python
import modelscope_studio as mgr
demo = mgr.load("modelscope/modelscope-studio", token="YOUR_ACCESS_TOKEN")
demo.launch()
```

## Initialization

| Parameter | Type | Default Value | Description                                                                                                                         |
| --------- | ---- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| name      | str  | None          | required. the name of the ModelScope Studio repo (e.g. "modelscope/modelscope-studio").                                             |
| token     | str  | None          | optional access token for loading private ModelScope Studio repo. Find your sdk token here: https://modelscope.cn/my/myaccesstoken. |