Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,14 @@ import gradio as gr
|
|
2 |
from gradio_model4dgs import Model4DGS
|
3 |
import os
|
4 |
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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():
|