Spaces:
Paused
Paused
Download app.py from hysts-debug/empty-dataframe: direct link, hf CLI and curl.
- Browser
- Download file 323 Bytes
-
https://huggingface.co/spaces/hysts-debug/empty-dataframe/resolve/main/app.py
- Command line
-
hf download hf://spaces/hysts-debug/empty-dataframe/app.py
-
curl -L -o app.py https://huggingface.co/spaces/hysts-debug/empty-dataframe/resolve/main/app.py
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() | |