File size: 485 Bytes
630cbf4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import gradio as gr

import modelscope_gradio_components as mgr

with gr.Blocks() as demo:
    mgr.Markdown(f"""
普通调用:

<accordion title="调用 tool">

```json
{{"text": "风和日丽", "resolution": "1024*1024"}}
```

</accordion>

使用 ::accordion-title 标记支持 markdown 语法:

<accordion>

::accordion-title[调用 `tool`]

```json
{{"text": "风和日丽", "resolution": "1024*1024"}}
```
</accordion>
""")

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