import gradio as gr from gradio_model4dgs import Model4DGS import os os.system("pip uninstall -y gradio") os.system("pip install gradio==4.21.0") image_dir = os.path.join(os.path.dirname(__file__), "assets") if os.path.exists(image_dir) and os.path.isdir(image_dir) and os.listdir(image_dir): examples = [os.path.join(image_dir, file) for file in os.listdir(image_dir)] else: examples = [os.path.join(os.path.dirname(__file__), example) for example in Model4DGS().example_inputs()] with gr.Blocks() as demo: with gr.Row(): Model4DGS(value=examples, label="4D Model") if __name__ == "__main__": demo.launch(share=True)