Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,8 +42,10 @@ def process_images(files):
|
|
| 42 |
|
| 43 |
result = subprocess.run(command, capture_output=True, text=True)
|
| 44 |
result_tree = subprocess.run(["tree", hashdir_path], capture_output=True, text=True)
|
|
|
|
|
|
|
| 45 |
|
| 46 |
-
return result_tree.stdout, result.stdout, result.stderr
|
| 47 |
|
| 48 |
def run():
|
| 49 |
with gr.Blocks() as demo:
|
|
@@ -54,9 +56,11 @@ def run():
|
|
| 54 |
# outputs = [gr.Image(type="numpy", label="Processed Images", interactive=False), gr.Video(label="Output Video")]
|
| 55 |
# outputs = [gr.Textbox(label="Log"), gr.Image(type="filepath", label="Processed Images", interactive=False)]
|
| 56 |
outputs = [
|
|
|
|
| 57 |
gr.Textbox(label="Output dirs"),
|
| 58 |
gr.Textbox(label="Log (stdout)"),
|
| 59 |
-
gr.Textbox(label="Log (stderr)")
|
|
|
|
| 60 |
btn.click(fn=process_images, inputs=inputs, outputs=outputs)
|
| 61 |
|
| 62 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
| 42 |
|
| 43 |
result = subprocess.run(command, capture_output=True, text=True)
|
| 44 |
result_tree = subprocess.run(["tree", hashdir_path], capture_output=True, text=True)
|
| 45 |
+
|
| 46 |
+
ply_file = os.path.join(hashdir_path, 'sparse/0/', 'points3D.ply')
|
| 47 |
|
| 48 |
+
return ply_file, result_tree.stdout, result.stdout, result.stderr
|
| 49 |
|
| 50 |
def run():
|
| 51 |
with gr.Blocks() as demo:
|
|
|
|
| 56 |
# outputs = [gr.Image(type="numpy", label="Processed Images", interactive=False), gr.Video(label="Output Video")]
|
| 57 |
# outputs = [gr.Textbox(label="Log"), gr.Image(type="filepath", label="Processed Images", interactive=False)]
|
| 58 |
outputs = [
|
| 59 |
+
gr.Model3D(label="3D Model"),
|
| 60 |
gr.Textbox(label="Output dirs"),
|
| 61 |
gr.Textbox(label="Log (stdout)"),
|
| 62 |
+
gr.Textbox(label="Log (stderr)"),
|
| 63 |
+
]
|
| 64 |
btn.click(fn=process_images, inputs=inputs, outputs=outputs)
|
| 65 |
|
| 66 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|