pmkhanh7890's picture
1st version of demo
1ce1659
raw
history blame
602 Bytes
#display a data
import gradio as gr
def data_display(replace_df):
return "aaaa"
with gr.Blocks() as demo:
replace_df = gr.Dataframe(
# headers=["Find what:", "Replace with:"],
# datatype=["str", "str"],
# row_count=(1, "dynamic"),
# col_count=(2, "fixed"),
# interactive=True
)
replace_button = gr.Button("Replace all")
news_content = gr.Textbox(label="Content", value="", lines=12)
replace_button.click(data_display,
inputs=[replace_df],
outputs=[news_content])
demo.launch()