File size: 568 Bytes
0d31e31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr
from gradio_model4dgs import Model4DGS
import os

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)