gradio/demo/matrix_transpose.py

18 lines
265 B
Python
Raw Normal View History

2020-08-22 05:20:05 +08:00
# Demo: (Dataframe) -> (Dataframe)
2020-08-06 01:42:52 +08:00
import gradio as gr
2020-08-28 23:56:03 +08:00
2020-08-06 01:42:52 +08:00
def transpose(matrix):
return matrix.T
2020-08-28 23:56:03 +08:00
io = gr.Interface(
transpose,
gr.inputs.Dataframe(type="numpy", datatype="number", row_count=5, col_count=3),
"numpy"
)
io.test_launch()
io.launch()