Spaces:
Sleeping
Sleeping
File size: 323 Bytes
c533c31 47db9a2 c533c31 47db9a2 c533c31 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#!/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()
|