Spaces:
Build error
Build error
Merge branch 'main' of https://huggingface.co/spaces/vast-ai/TriplaneGaussian
Browse files
app.py
CHANGED
|
@@ -99,7 +99,7 @@ def preprocess(image_path, save_path):
|
|
| 99 |
|
| 100 |
subprocess.run([f"python run_sam.py --image_path {image_path} --save_path {save_path}"], shell=True)
|
| 101 |
|
| 102 |
-
|
| 103 |
return save_path
|
| 104 |
|
| 105 |
def init_trial_dir():
|
|
@@ -193,11 +193,11 @@ def launch(port):
|
|
| 193 |
img_run_btn.click(
|
| 194 |
fn=assert_input_image,
|
| 195 |
inputs=[input_image],
|
| 196 |
-
queue=False
|
| 197 |
).success(
|
| 198 |
fn=init_trial_dir,
|
| 199 |
outputs=[trial_dir],
|
| 200 |
-
queue=False
|
| 201 |
).success(
|
| 202 |
fn=preprocess,
|
| 203 |
inputs=[input_image, trial_dir],
|
|
@@ -210,7 +210,7 @@ def launch(port):
|
|
| 210 |
outputs=[output_video])
|
| 211 |
|
| 212 |
launch_args = {"server_port": port}
|
| 213 |
-
demo.queue(max_size=
|
| 214 |
demo.launch(auth=AUTH, **launch_args)
|
| 215 |
|
| 216 |
if __name__ == "__main__":
|
|
|
|
| 99 |
|
| 100 |
subprocess.run([f"python run_sam.py --image_path {image_path} --save_path {save_path}"], shell=True)
|
| 101 |
|
| 102 |
+
print("image save path = ", save_path)
|
| 103 |
return save_path
|
| 104 |
|
| 105 |
def init_trial_dir():
|
|
|
|
| 193 |
img_run_btn.click(
|
| 194 |
fn=assert_input_image,
|
| 195 |
inputs=[input_image],
|
| 196 |
+
# queue=False
|
| 197 |
).success(
|
| 198 |
fn=init_trial_dir,
|
| 199 |
outputs=[trial_dir],
|
| 200 |
+
# queue=False
|
| 201 |
).success(
|
| 202 |
fn=preprocess,
|
| 203 |
inputs=[input_image, trial_dir],
|
|
|
|
| 210 |
outputs=[output_video])
|
| 211 |
|
| 212 |
launch_args = {"server_port": port}
|
| 213 |
+
demo.queue(max_size=4)
|
| 214 |
demo.launch(auth=AUTH, **launch_args)
|
| 215 |
|
| 216 |
if __name__ == "__main__":
|