empty-dataframe / app.py
hysts's picture
hysts HF Staff
Update
47db9a2
raw
history blame contribute delete
323 Bytes
#!/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()