gradio/demo/matrix_transpose.py
2020-08-21 14:20:05 -07:00

14 lines
263 B
Python

# Demo: (Dataframe) -> (Dataframe)
import gradio as gr
import numpy as np
import random
def transpose(matrix):
return matrix.T
gr.Interface(transpose,
gr.inputs.Dataframe(type="numpy", datatype="number", row_count=5, col_count=3),
"numpy"
).launch()