File size: 2,389 Bytes
e841ba5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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():
            with antd.Space(direction="vertical",
                            size="middle",
                            elem_style=dict(width="100%")):
                with antd.Badge.Ribbon(text="Hippies"):
                    with antd.Card(title="Pushes open the window",
                                   size="small"):
                        ms.Text("and raises the spyglass.")

                with antd.Badge.Ribbon(text="Hippies", color="pink"):
                    with antd.Card(title="Pushes open the window",
                                   size="small"):
                        ms.Text("and raises the spyglass.")

                with antd.Badge.Ribbon(text="Hippies", color="red"):
                    with antd.Card(title="Pushes open the window",
                                   size="small"):
                        ms.Text("and raises the spyglass.")

                with antd.Badge.Ribbon(text="Hippies", color="cyan"):
                    with antd.Card(title="Pushes open the window",
                                   size="small"):
                        ms.Text("and raises the spyglass.")

                with antd.Badge.Ribbon(text="Hippies", color="green"):
                    with antd.Card(title="Pushes open the window",
                                   size="small"):
                        ms.Text("and raises the spyglass.")

                with antd.Badge.Ribbon(text="Hippies", color="purple"):
                    with antd.Card(title="Pushes open the window",
                                   size="small"):
                        ms.Text("and raises the spyglass.")

                with antd.Badge.Ribbon(text="Hippies", color="volcano"):
                    with antd.Card(title="Pushes open the window",
                                   size="small"):
                        ms.Text("and raises the spyglass.")

                with antd.Badge.Ribbon(text="Hippies", color="magenta"):
                    with antd.Card(title="Pushes open the window",
                                   size="small"):
                        ms.Text("and raises the spyglass.")
if __name__ == "__main__":
    demo.queue().launch()