Langelaw commited on
Commit
d7f33a2
1 Parent(s): 2ec2bd1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -2,7 +2,14 @@ import gradio as gr
2
  from gradio_model4dgs import Model4DGS
3
  import os
4
 
5
- examples = [os.path.join(os.path.dirname(__file__), example) for example in Model4DGS().example_inputs()]
 
 
 
 
 
 
 
6
 
7
  with gr.Blocks() as demo:
8
  with gr.Row():
 
2
  from gradio_model4dgs import Model4DGS
3
  import os
4
 
5
+ os.system('pip install gradio_model4dgs')
6
+
7
+ image_dir = os.path.join(os.path.dirname(__file__), "assets")
8
+
9
+ if os.path.exists(image_dir) and os.path.isdir(image_dir) and os.listdir(image_dir):
10
+ examples = [os.path.join(image_dir, file) for file in os.listdir(image_dir)]
11
+ else:
12
+ examples = [os.path.join(os.path.dirname(__file__), example) for example in Model4DGS().example_inputs()]
13
 
14
  with gr.Blocks() as demo:
15
  with gr.Row():