File size: 485 Bytes
b1d1fbc e397dd1 b1d1fbc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import gradio as gr
TOTAL = 0
with gr.Blocks() as demo:
gr.Markdown("Nice 3D View")
t = gr.Timer(value=2.0)
m = gr.Model3D(value='Duck.glb', label='3D', height=500, interactive=False, clear_color=[0.0, 0.0, 0.0, 0.0])
@t.tick(inputs=[t], outputs=[m])
def update_geometry(x):
global TOTAL
TOTAL += 10
camera_position = (TOTAL, 45, 1)
print(camera_position)
return gr.Model3D(camera_position=camera_position)
demo.launch() |