Spaces:
Running
Running
File size: 518 Bytes
db32e48 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import gradio as gr
import modelscope_studio as mgr
with gr.Blocks() as demo:
mgr.Markdown(
"""
custom tag:<custom-tag value="aaa"></custom-tag>
""",
custom_components={
# Key is the tag name
"custom-tag": {
# The tag props.
"props": ["value"],
# The tag template, use `{prop}` as placeholder。
"template": "<div>{value}</div>"
}
})
if __name__ == "__main__":
demo.queue().launch()
|