Skip to content

Latest commit

 

History

History
96 lines (64 loc) · 2.93 KB

File metadata and controls

96 lines (64 loc) · 2.93 KB

ModelScope Studio

✖️

GitHub | 🤖 ModelScope Studio | 🤗 Hugging Face Space
中文  |  English  |  日本語

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:

site

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 >= 6.0.0

Note: Your Gradio version must<=6.8.0, why?

Installation

pip install modelscope_studio

If you need to use 4.43.0 <= Gradio < 6.0.0, please use 1.x version:

pip install modelscope_studio~=1.0

Quick Start

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

Wiki

Link

Development

Clone this repo locally:

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:

gradio cc dev docs/app.py