cube_example / app.py
jleibs's picture
Update to latest rerun
decfd9e
raw
history blame
439 Bytes
import rerun as rr
import numpy as np
import gradio as gr
def show_cube():
rr.init("my data")
positions = np.zeros((10, 3))
positions[:,0] = np.linspace(-10,10,10)
colors = np.zeros((10,3), dtype=np.uint8)
colors[:,0] = np.linspace(0,255,10)
rr.log("my_points", rr.Points3D(positions=positions, colors=colors, radii=0.5))
return rr.as_html()
gr.Interface(show_cube, inputs=None, outputs=["html"]).launch()