File size: 575 Bytes
d7fc160
 
 
 
e8ed588
d7f33a2
e8ed588
 
 
 
d7fc160
e8ed588
 
 
d7fc160
 
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", fps=8)

if __name__ == "__main__":
    demo.launch(share=True)