Spaces:
Running
Running
User integers instead
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ def build_color_grid(x_count=10, y_count=10, z_count=10, twist=0):
|
|
52 |
return ColorGrid(positions.T, colors.T.astype(np.uint8))
|
53 |
|
54 |
|
55 |
-
def html_template(rrd, width=
|
56 |
encoded_url = urllib.parse.quote(rrd)
|
57 |
return f"""<iframe width="{width}" height="{height}" src="{app_url}?url={encoded_url}" frameborder="0" allowfullscreen=""></iframe>"""
|
58 |
|
@@ -71,9 +71,9 @@ def show_cube(x, y, z):
|
|
71 |
|
72 |
with gr.Blocks() as demo:
|
73 |
with gr.Row():
|
74 |
-
x_count = gr.
|
75 |
-
y_count = gr.
|
76 |
-
z_count = gr.
|
77 |
button = gr.Button("Show Cube")
|
78 |
with gr.Row():
|
79 |
rrd = gr.File()
|
|
|
52 |
return ColorGrid(positions.T, colors.T.astype(np.uint8))
|
53 |
|
54 |
|
55 |
+
def html_template(rrd, width=1470, height=900, app_url="https://app.rerun.io"):
|
56 |
encoded_url = urllib.parse.quote(rrd)
|
57 |
return f"""<iframe width="{width}" height="{height}" src="{app_url}?url={encoded_url}" frameborder="0" allowfullscreen=""></iframe>"""
|
58 |
|
|
|
71 |
|
72 |
with gr.Blocks() as demo:
|
73 |
with gr.Row():
|
74 |
+
x_count = gr.Number(minimum=1, maximum=10, value=5, precision=0, label="X Count")
|
75 |
+
y_count = gr.Number(minimum=1, maximum=10, value=5, precision=0, label="Y Count")
|
76 |
+
z_count = gr.Number(minimum=1, maximum=10, value=5, precision=0, label="Z Count")
|
77 |
button = gr.Button("Show Cube")
|
78 |
with gr.Row():
|
79 |
rrd = gr.File()
|