import gradio as gr import os from torch import is_inference from pq3d.inference import inference MESH_DIR = 'assets/mesh' MESH_NAMES = sorted([os.path.splitext(fname)[0] for fname in os.listdir(MESH_DIR)]) def change_scene(dropdown_scene: str): # reset 3D scene and chatbot history return os.path.join(MESH_DIR, f'{dropdown_scene}.glb') with gr.Blocks(title='PQ3D Demo') as demo: gr.HTML(value="
arXiv | Project Page | Code
") #gr.HTML(value="LEO: an embodied generalist agent capable of perceiving, grounding, reasoning, planning, and acting in 3D world.
") with gr.Row(): with gr.Column(scale=5): dropdown_scene = gr.Dropdown( choices=MESH_NAMES, value='scene0050_00', interactive=True, label='Select a 3D scene', ) model_3d = gr.Model3D( value=os.path.join(MESH_DIR, f'scene0050_00.glb'), clear_color=[0.0, 0.0, 0.0, 0.0], label='3D Scene', camera_position=(80, 100, 6), height=659, ) gr.HTML( """