Spaces:
Sleeping
Sleeping
| #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() |