Spaces:
Sleeping
Sleeping
Test app
Browse files- app.py +19 -0
- requirements.txt +1 -0
app.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import rerun as rr
|
| 2 |
+
import numpy as np
|
| 3 |
+
import gradio as gr
|
| 4 |
+
|
| 5 |
+
def show_cube():
|
| 6 |
+
rr.init("my data")
|
| 7 |
+
|
| 8 |
+
rec = rr.memory_recording()
|
| 9 |
+
|
| 10 |
+
positions = np.zeros((10, 3))
|
| 11 |
+
positions[:,0] = np.linspace(-10,10,10)
|
| 12 |
+
|
| 13 |
+
colors = np.zeros((10,3), dtype=np.uint8)
|
| 14 |
+
colors[:,0] = np.linspace(0,255,10)
|
| 15 |
+
|
| 16 |
+
rr.log_points("my_points", positions=positions, colors=colors, radii=0.5)
|
| 17 |
+
return rec.as_html()
|
| 18 |
+
|
| 19 |
+
gr.Interface(show_cube, outputs=["html"]).launch()
|
requirements.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
rerun-sdk==0.5.0
|