Spaces:
Sleeping
Sleeping
| #!/usr/bin/env python | |
| import gradio as gr | |
| import pandas as pd | |
| df_orig = pd.DataFrame([], columns=['a', 'b']) | |
| with gr.Blocks() as demo: | |
| df = gr.Dataframe(value=df_orig, interactive=False) | |
| btn = gr.Button() | |
| text = gr.Textbox() | |
| btn.click(fn=lambda x: x.shape, inputs=df, outputs=text) | |
| demo.queue().launch() | |