mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-27 02:30:17 +08:00
18 lines
265 B
Python
18 lines
265 B
Python
# Demo: (Dataframe) -> (Dataframe)
|
|
|
|
import gradio as gr
|
|
|
|
|
|
def transpose(matrix):
|
|
return matrix.T
|
|
|
|
|
|
io = gr.Interface(
|
|
transpose,
|
|
gr.inputs.Dataframe(type="numpy", datatype="number", row_count=5, col_count=3),
|
|
"numpy"
|
|
)
|
|
|
|
io.test_launch()
|
|
io.launch()
|