File size: 3,818 Bytes
5945dda
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import gradio as gr
import modelscope_studio.components.antd as antd
import modelscope_studio.components.antdx as antdx
import modelscope_studio.components.base as ms

with gr.Blocks() as demo:
    with ms.Application():
        with antdx.XProvider():
            with antd.Card():
                with antdx.ThoughtChain(collapsible=True):
                    with antdx.ThoughtChain.Item(
                            title="1 - Thought Chain Item",
                            description="description"):
                        with ms.Slot("extra"):
                            with antd.Button(value=None, type="text"):
                                with ms.Slot("icon"):
                                    antd.Icon("MoreOutlined")
                        with ms.Slot("content"):
                            with antdx.ThoughtChain():
                                with antdx.ThoughtChain.Item(
                                        title="1-1 - Thought Chain Item",
                                        description="description"):
                                    with ms.Slot("extra"):
                                        with antd.Button(value=None,
                                                         type="text"):
                                            with ms.Slot("icon"):
                                                antd.Icon("MoreOutlined")
                                with antdx.ThoughtChain.Item(
                                        title="1-2 - Thought Chain Item",
                                        description="description"):
                                    with ms.Slot("extra"):
                                        with antd.Button(value=None,
                                                         type="text"):
                                            with ms.Slot("icon"):
                                                antd.Icon("MoreOutlined")
                        with ms.Slot("footer"):
                            antd.Button("1 - Thought Chain Item Footer")
                    with antdx.ThoughtChain.Item(
                            title="2 - Thought Chain Item",
                            description="description"):
                        with ms.Slot("extra"):
                            with antd.Button(value=None, type="text"):
                                with ms.Slot("icon"):
                                    antd.Icon("MoreOutlined")
                        with ms.Slot("content"):
                            with antdx.ThoughtChain():
                                with antdx.ThoughtChain.Item(
                                        title="2-1 - Thought Chain Item",
                                        description="description"):
                                    with ms.Slot("extra"):
                                        with antd.Button(value=None,
                                                         type="text"):
                                            with ms.Slot("icon"):
                                                antd.Icon("MoreOutlined")
                                with antdx.ThoughtChain.Item(
                                        title="2-2 - Thought Chain Item",
                                        description="description"):
                                    with ms.Slot("extra"):
                                        with antd.Button(value=None,
                                                         type="text"):
                                            with ms.Slot("icon"):
                                                antd.Icon("MoreOutlined")
                        with ms.Slot("footer"):
                            antd.Button("2 - Thought Chain Item Footer")

if __name__ == "__main__":
    demo.queue().launch()