fix: add copy button to Markdown components in gradio_app.py

This commit is contained in:
myhloli
2025-12-02 02:21:51 +08:00
parent 37714b2842
commit dfa02df68f

View File

@@ -438,11 +438,11 @@ def main(ctx,
output_file = gr.File(label='convert result', interactive=False)
with gr.Tabs():
with gr.Tab('Markdown rendering'):
md = gr.Markdown(label='Markdown rendering', height=1100,
md = gr.Markdown(label='Markdown rendering', height=1100, show_copy_button=True,
latex_delimiters=latex_delimiters,
line_breaks=True)
with gr.Tab('Markdown text'):
md_text = gr.TextArea(lines=45,)
md_text = gr.TextArea(lines=45, show_copy_button=True)
# 添加事件处理
backend.change(