Skip to main content

A third-party component library based on Gradio.

Project description

The current document version is 1.0 beta. If you are using a previous version of modelscope_studio, please switch to the legacy branch for reference.

ModelScope Studio

✖️

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

modelscope_studio is a third-party component library based on Gradio, extending more components and usage forms on top of the original Gradio components.

Currently supported UI libraries:

When to Use

Compared to Gradio's own components, 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, modelscope_studio may not be the best choice, but you can still use modelscope_studio's layout and display components to help build your app.

Dependencies

  • Gradio >= 4.0

Installation

Currently, modelscope_studio version 1.0 is still under development. You can use the beta version in advance.

pip install modelscope_studio~=1.0.0b

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():
        with antd.ConfigProvider():
            antd.DatePicker()

demo.queue().launch()

Documentation and Examples

Migration to 1.0

If you have previously used modelscope_studio components and want to continue using them in the new version, no modifications to the original components are needed. You just need to introduce ms.Application in the outer layer.

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:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

modelscope_studio-1.0.0b4.tar.gz (10.7 MB view details)

Uploaded Source

Built Distribution

modelscope_studio-1.0.0b4-py3-none-any.whl (11.4 MB view details)

Uploaded Python 3

File details

Details for the file modelscope_studio-1.0.0b4.tar.gz.

File metadata

  • Download URL: modelscope_studio-1.0.0b4.tar.gz
  • Upload date:
  • Size: 10.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for modelscope_studio-1.0.0b4.tar.gz
Algorithm Hash digest
SHA256 d5172ba581771421cf71c92e2c7bb3fc8a137ed9af0d58c8b4dfac89fbd72f68
MD5 35b1ce7bd4d0d9826698687eb43df245
BLAKE2b-256 f632bac640af8159736579626b2fb2199c51362c379366dc98fe6493d5339fb5

See more details on using hashes here.

File details

Details for the file modelscope_studio-1.0.0b4-py3-none-any.whl.

File metadata

File hashes

Hashes for modelscope_studio-1.0.0b4-py3-none-any.whl
Algorithm Hash digest
SHA256 0d20222c543071e24003226334c8bc981d78a7e642399225d8a06713db860e30
MD5 82c21bbd2c82e5460fb2ee139e637caa
BLAKE2b-256 d4f1c407e266f4d816abaef7a81e2feab8c5c92bcf38b3d954e9e0e6858126a0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page