Spaces:
Running
Running
Download components/antdx/thought_chain/demos/nested_use.py from modelscope/modelscope-studio: direct link, hf CLI and curl.
- Browser
- Download file 3.87 kB
-
https://huggingface.co/spaces/modelscope/modelscope-studio/resolve/main/components/antdx/thought_chain/demos/nested_use.py
- Command line
-
hf download hf://spaces/modelscope/modelscope-studio/components/antdx/thought_chain/demos/nested_use.py
-
curl -L -o nested_use.py https://huggingface.co/spaces/modelscope/modelscope-studio/resolve/main/components/antdx/thought_chain/demos/nested_use.py
3.87 kB
| 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(): | |
| with antdx.ThoughtChain.ThoughtChainItem( | |
| 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.ThoughtChainItem( | |
| 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.ThoughtChainItem( | |
| 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.ThoughtChainItem( | |
| 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.ThoughtChainItem( | |
| 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.ThoughtChainItem( | |
| 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() | |