Skip to main content

A third-party component library based on Gradio.

Project description

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

Installation

pip install modelscope_studio

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

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.

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


Release history Release notifications | RSS feed

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.6.1.tar.gz (23.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

modelscope_studio-1.6.1-py3-none-any.whl (24.9 MB view details)

Uploaded Python 3

File details

Details for the file modelscope_studio-1.6.1.tar.gz.

File metadata

  • Download URL: modelscope_studio-1.6.1.tar.gz
  • Upload date:
  • Size: 23.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for modelscope_studio-1.6.1.tar.gz
Algorithm Hash digest
SHA256 6d3bb0d973ec5b2be26fc1cbf699b7558560d1c01144b074d13d24e9633f0cc2
MD5 154786e3e14fb52ddbeeab4bd782ee10
BLAKE2b-256 9c75869ceedb279552be4d6003e7779ae00207184a7bb2d281f4700a40425ab5

See more details on using hashes here.

File details

Details for the file modelscope_studio-1.6.1-py3-none-any.whl.

File metadata

File hashes

Hashes for modelscope_studio-1.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 533e2f25d289f2cbbcc7d6ab5c473ce730a061b78e48f798d345634bab416cb3
MD5 d2465d407d8884bb90baf2c3b3a62680
BLAKE2b-256 c80073476799d64bfd75837426941fc48e4e882efd155b14ca5ce149f7a41f03

See more details on using hashes here.

Supported by

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