gradio/demo/matrix_transpose.py

13 lines
245 B
Python
Raw Normal View History

2020-08-06 01:42:52 +08:00
import gradio as gr
import numpy as np
import random
def transpose(matrix):
print(matrix)
return matrix.T
gr.Interface(transpose,
gr.inputs.Dataframe(type="numpy", datatype="number", row_count=5, col_count=3),
"numpy"
).launch()