File size: 454 Bytes
72945c4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import rerun as rr
import numpy as np
import gradio as gr

def show_cube():
    rr.init("my data")

    rec = rr.memory_recording()

    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_points("my_points", positions=positions, colors=colors, radii=0.5)
    return rec.as_html()

gr.Interface(show_cube, outputs=["html"]).launch()