Spaces:
Running
on
Zero
Running
on
Zero
JianyuanWang
commited on
Commit
•
dc32bb2
1
Parent(s):
f2aebd1
commit
Browse files
app.py
CHANGED
@@ -10,6 +10,7 @@ import os
|
|
10 |
|
11 |
sys.path.append('vggsfm_code/')
|
12 |
import shutil
|
|
|
13 |
|
14 |
from vggsfm_code.hf_demo import demo_fn
|
15 |
from omegaconf import DictConfig, OmegaConf
|
@@ -33,9 +34,11 @@ def vggsfm_demo(
|
|
33 |
cfg_file = "vggsfm_code/cfgs/demo.yaml"
|
34 |
cfg = OmegaConf.load(cfg_file)
|
35 |
|
|
|
|
|
36 |
max_input_image = 20
|
37 |
|
38 |
-
target_dir = f"
|
39 |
if os.path.exists(target_dir):
|
40 |
shutil.rmtree(target_dir)
|
41 |
|
@@ -169,9 +172,11 @@ if True:
|
|
169 |
],
|
170 |
outputs=[gr.Model3D(label="Reconstruction"), gr.Textbox(label="Log")],
|
171 |
cache_examples=True,
|
172 |
-
allow_flagging=False,
|
|
|
|
|
173 |
)
|
174 |
-
demo.queue(max_size=20
|
175 |
|
176 |
# demo.launch(debug=True, share=True)
|
177 |
else:
|
|
|
10 |
|
11 |
sys.path.append('vggsfm_code/')
|
12 |
import shutil
|
13 |
+
from datetime import datetime
|
14 |
|
15 |
from vggsfm_code.hf_demo import demo_fn
|
16 |
from omegaconf import DictConfig, OmegaConf
|
|
|
34 |
cfg_file = "vggsfm_code/cfgs/demo.yaml"
|
35 |
cfg = OmegaConf.load(cfg_file)
|
36 |
|
37 |
+
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
38 |
+
|
39 |
max_input_image = 20
|
40 |
|
41 |
+
target_dir = f"input_images_{timestamp}"
|
42 |
if os.path.exists(target_dir):
|
43 |
shutil.rmtree(target_dir)
|
44 |
|
|
|
172 |
],
|
173 |
outputs=[gr.Model3D(label="Reconstruction"), gr.Textbox(label="Log")],
|
174 |
cache_examples=True,
|
175 |
+
# allow_flagging=False,
|
176 |
+
allow_flagging='never', # Updated from False to 'never'
|
177 |
+
concurrency_limit=1 # Added concurrency_limit to Interface
|
178 |
)
|
179 |
+
demo.queue(max_size=20).launch(debug=True)
|
180 |
|
181 |
# demo.launch(debug=True, share=True)
|
182 |
else:
|