# 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/)

## 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.
## Dependencies
- Gradio >= 4.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():
with antd.ConfigProvider():
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": "YOUR NAME <YOUREMAIL@domain.com>",
"download_url": "https://files.pythonhosted.org/packages/fc/26/bd7a96bb48e84e58905cdc8aa4db9075f45d2bdab849e31c49e09841ef81/modelscope_studio-1.1.0.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\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## Dependencies\n\n- Gradio >= 4.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():\n with antd.ConfigProvider():\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.1.0",
"project_urls": null,
"split_keywords": [
"antd",
" antdx",
" gradio-antd",
" gradio-antdx",
" gradio-custom-component",
" modelscope-studio"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "de22c1d41ab963362e5196f43750888da8bb01e8fab3dd939f0cd743567cdc89",
"md5": "3ecb47012d78a58a55849ac8345ad4a1",
"sha256": "934d401637f179878a94c0c3661a7bb6a1594948ff00acd33167df4adc4cba2d"
},
"downloads": -1,
"filename": "modelscope_studio-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3ecb47012d78a58a55849ac8345ad4a1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 13835561,
"upload_time": "2025-02-06T04:54:08",
"upload_time_iso_8601": "2025-02-06T04:54:08.138465Z",
"url": "https://files.pythonhosted.org/packages/de/22/c1d41ab963362e5196f43750888da8bb01e8fab3dd939f0cd743567cdc89/modelscope_studio-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fc26bd7a96bb48e84e58905cdc8aa4db9075f45d2bdab849e31c49e09841ef81",
"md5": "01a8aca23d300b456d7acc11d5e85fda",
"sha256": "7349c4a011124abfc2ca292ff4cc34504641bbf3a6214a919db3a63e1f33788e"
},
"downloads": -1,
"filename": "modelscope_studio-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "01a8aca23d300b456d7acc11d5e85fda",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 12848823,
"upload_time": "2025-02-06T04:54:11",
"upload_time_iso_8601": "2025-02-06T04:54:11.730765Z",
"url": "https://files.pythonhosted.org/packages/fc/26/bd7a96bb48e84e58905cdc8aa4db9075f45d2bdab849e31c49e09841ef81/modelscope_studio-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-06 04:54:11",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "modelscope-studio"
}