# ModelScope Studio
<p align="center">
<img src="https://modelscope.oss-cn-beijing.aliyuncs.com/modelscope.gif" height="60" style="vertical-align: middle;"/>
<span style="font-size: 30px; vertical-align: middle;">
✖️
</span>
<img src="https://github.com/gradio-app/gradio/raw/main/readme_files/gradio.svg" height="60" style="vertical-align: middle;">
<p>
<p align="center">
<a href="https://github.com/modelscope/modelscope-studio">GitHub</a> | 🤖 <a href="https://modelscope.cn/studios/modelscope/modelscope-studio">ModelScope Studio</a> | 🤗 <a href="https://huggingface.co/spaces/modelscope/modelscope-studio">Hugging Face Space</a>
<br>
<a href="README-zh_CN.md">中文</a>  |  English  |  <a href="README-ja_JP.md">日本語</a>
</p>
`modelscope_studio` is a third-party component library based on Gradio, offers developers more customized interface building capabilities and a richer variety of component usage forms.
Currently supported UI libraries:
- [Ant Design](https://ant.design/)
- [Ant Design X](https://x.ant.design/)

## When to Use
Compared to the original components of Gradio, `modelscope_studio` focuses more on page layout and component flexibility. If you want to build a more beautiful user interface, we highly recommend using `modelscope_studio`.
However, when your application needs Gradio to handle more built-in data on the Python side, the components of `modelscope_studio` may not be the best choice, but don't worry, it integrates well with existing Gradio components, you can still use `modelscope_studio` to optimize your application.
> If you are using `modelscope_studio` in Hugging Face Space, please add the `ssr_mode=False` parameter to the `demo.launch()`: `demo.launch(ssr_mode=False)`, otherwise the page may not display properly.
## Dependencies
- Gradio >= 4.43.0
## Installation
```sh
pip install modelscope_studio
```
## Quick Start
```python
import gradio as gr
import modelscope_studio.components.antd as antd
import modelscope_studio.components.base as ms
with gr.Blocks() as demo:
with ms.Application(), antd.ConfigProvider(), ms.AutoLoading():
antd.DatePicker()
demo.queue().launch()
```
## Documentation and Examples
- ModelScope: [中文](https://modelscope.cn/studios/modelscope/modelscope-studio)
- Hugging Face: [English](https://huggingface.co/spaces/modelscope/modelscope-studio)
## Migration to 1.0
If you have used the `modelscope_studio` component before and want to continue using it in the new version, you do not need to make any changes to the original component, just import `ms.Application` in the outer layer.
```python
import gradio as gr
import modelscope_studio.components.base as ms
import modelscope_studio.components.legacy as mgr
with gr.Blocks() as demo:
with ms.Application():
mgr.Chatbot()
demo.launch()
```
## Development
Clone this repo locally:
```sh
git clone git@github.com:modelscope/modelscope-studio.git
cd modelscope-studio
# for backend
pip install -e '.'
# for frontend
npm install pnpm -g
pnpm install
pnpm build
```
Run `gradio cc dev` to start demo:
```sh
gradio cc dev docs/app.py
```
Raw data
{
"_id": null,
"home_page": null,
"name": "modelscope-studio",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "antd, antdx, gradio-antd, gradio-antdx, gradio-custom-component, modelscope-studio",
"author": null,
"author_email": "ModelScope team <contact@modelscope.cn>",
"download_url": "https://files.pythonhosted.org/packages/5a/96/dfa19af2e95a8d1fa34ca4764ac6daeb402f470333f8834ab428a68933d8/modelscope_studio-1.5.1.tar.gz",
"platform": null,
"description": "# ModelScope Studio\n\n<p align=\"center\">\n <img src=\"https://modelscope.oss-cn-beijing.aliyuncs.com/modelscope.gif\" height=\"60\" style=\"vertical-align: middle;\"/>\n <span style=\"font-size: 30px; vertical-align: middle;\">\n \u2716\ufe0f\n </span>\n <img src=\"https://github.com/gradio-app/gradio/raw/main/readme_files/gradio.svg\" height=\"60\" style=\"vertical-align: middle;\">\n<p>\n\n<p align=\"center\">\n<a href=\"https://github.com/modelscope/modelscope-studio\">GitHub</a> | \ud83e\udd16 <a href=\"https://modelscope.cn/studios/modelscope/modelscope-studio\">ModelScope Studio</a> \uff5c \ud83e\udd17 <a href=\"https://huggingface.co/spaces/modelscope/modelscope-studio\">Hugging Face Space</a>\n<br>\n <a href=\"README-zh_CN.md\">\u4e2d\u6587</a>  \uff5c  English  \uff5c  <a href=\"README-ja_JP.md\">\u65e5\u672c\u8a9e</a>\n</p>\n\n`modelscope_studio` is a third-party component library based on Gradio, offers developers more customized interface building capabilities and a richer variety of component usage forms.\n\nCurrently supported UI libraries:\n\n- [Ant Design](https://ant.design/)\n- [Ant Design X](https://x.ant.design/)\n\n\n\n## When to Use\n\nCompared to the original components of Gradio, `modelscope_studio` focuses more on page layout and component flexibility. If you want to build a more beautiful user interface, we highly recommend using `modelscope_studio`.\n\nHowever, when your application needs Gradio to handle more built-in data on the Python side, the components of `modelscope_studio` may not be the best choice, but don't worry, it integrates well with existing Gradio components, you can still use `modelscope_studio` to optimize your application.\n\n> If you are using `modelscope_studio` in Hugging Face Space, please add the `ssr_mode=False` parameter to the `demo.launch()`: `demo.launch(ssr_mode=False)`, otherwise the page may not display properly.\n\n## Dependencies\n\n- Gradio >= 4.43.0\n\n## Installation\n\n```sh\npip install modelscope_studio\n```\n\n## Quick Start\n\n```python\nimport gradio as gr\n\nimport modelscope_studio.components.antd as antd\nimport modelscope_studio.components.base as ms\n\nwith gr.Blocks() as demo:\n with ms.Application(), antd.ConfigProvider(), ms.AutoLoading():\n antd.DatePicker()\n\ndemo.queue().launch()\n```\n\n## Documentation and Examples\n\n- ModelScope: [\u4e2d\u6587](https://modelscope.cn/studios/modelscope/modelscope-studio)\n- Hugging Face: [English](https://huggingface.co/spaces/modelscope/modelscope-studio)\n\n## Migration to 1.0\n\nIf you have used the `modelscope_studio` component before and want to continue using it in the new version, you do not need to make any changes to the original component, just import `ms.Application` in the outer layer.\n\n```python\nimport gradio as gr\nimport modelscope_studio.components.base as ms\nimport modelscope_studio.components.legacy as mgr\n\nwith gr.Blocks() as demo:\n with ms.Application():\n mgr.Chatbot()\n\ndemo.launch()\n```\n\n## Development\n\nClone this repo locally:\n\n```sh\ngit clone git@github.com:modelscope/modelscope-studio.git\ncd modelscope-studio\n# for backend\npip install -e '.'\n# for frontend\nnpm install pnpm -g\n\npnpm install\npnpm build\n```\n\nRun `gradio cc dev` to start demo:\n\n```sh\ngradio cc dev docs/app.py\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "A third-party component library based on Gradio.",
"version": "1.5.1",
"project_urls": null,
"split_keywords": [
"antd",
" antdx",
" gradio-antd",
" gradio-antdx",
" gradio-custom-component",
" modelscope-studio"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "af07a0c911d1d5380b46e582ac3ac156ea24059cf2d236aa5b2bcaf9b903e8fd",
"md5": "8064acdf2d0e87818ebc2850cbb6d58f",
"sha256": "c0307577035c11bd78e175eb962b44252f77d4e30b97d7f1a5bfa3a1ba6de906"
},
"downloads": -1,
"filename": "modelscope_studio-1.5.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8064acdf2d0e87818ebc2850cbb6d58f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 15758833,
"upload_time": "2025-10-10T06:37:34",
"upload_time_iso_8601": "2025-10-10T06:37:34.094978Z",
"url": "https://files.pythonhosted.org/packages/af/07/a0c911d1d5380b46e582ac3ac156ea24059cf2d236aa5b2bcaf9b903e8fd/modelscope_studio-1.5.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5a96dfa19af2e95a8d1fa34ca4764ac6daeb402f470333f8834ab428a68933d8",
"md5": "8a6e84ef5744094de6b9bdf097272b5f",
"sha256": "31507fd10aa4f6ee6cedc5b518af957fd83a69c8b68410188e85c565428fa0fb"
},
"downloads": -1,
"filename": "modelscope_studio-1.5.1.tar.gz",
"has_sig": false,
"md5_digest": "8a6e84ef5744094de6b9bdf097272b5f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 14712650,
"upload_time": "2025-10-10T06:37:36",
"upload_time_iso_8601": "2025-10-10T06:37:36.852352Z",
"url": "https://files.pythonhosted.org/packages/5a/96/dfa19af2e95a8d1fa34ca4764ac6daeb402f470333f8834ab428a68933d8/modelscope_studio-1.5.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-10 06:37:36",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "modelscope-studio"
}