modelscope-studio / README-zh_CN.md
Coloring's picture
fix: 0.x => 1.0
e841ba5

A newer version of the Gradio SDK is available: 5.16.1

Upgrade

ModelScope Studio

✖️

GitHub | 🤖 ModelScope Studio | 🤗 Hugging Face Space

modelscope_studio是一个基于 Gradio 的三方组件库,为开发者提供更定制化的界面搭建能力和更丰富的组件使用形式。

目前支持的 UI 库:

何时使用

比起 Gradio 自身的组件,modelscope_studio更加注重页面布局和组件的灵活性,如果您想要构建更漂亮的用户界面,我们非常推荐您使用modelscope_studio

然而,当您的应用需要 Gradio 在 Python 端更多地处理内置数据时,modelscope_studio的组件可能不是最好的选择,但是不用担心,它可以很好地与已有的 Gradio 组件相结合,您仍然可以使用modelscope_studio来优化您的应用。

依赖

  • Gradio >= 4.0

安装

pip install modelscope_studio

示例

迁移到 1.0

如果您在之前使用了modelscope_studio的组件,并且想要在新版本中继续使用。不需要对原有组件做任何修改,只需要在外层引入ms.Application即可。

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()