mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-17 11:29:58 +08:00
* fixed visibility error in notebooks in github * Delete fixNotebooks.py deleted script used to fix notebooks * Update generate_notebooks.py fixed a small bug that prevented visibility of notebooks in GitHub
1.0 KiB
1.0 KiB
Gradio Demo: dataframe_block-ui-test¶
In [ ]:
!pip install -q gradio
In [ ]:
import gradio as gr with gr.Blocks() as demo: count = gr.Slider(minimum=1, maximum=10, step=1, label="count") data = gr.DataFrame( headers=["A", "B"], col_count=(2, "fixed"), type="array", interactive=True ) btn = gr.Button(value="click") btn.click( fn=lambda cnt: [[str(2 * i), str(2 * i + 1)] for i in range(int(cnt))], inputs=[count], outputs=[data], ) demo.launch()