Spaces:
Running
on
Zero
Running
on
Zero
slothfulxtx
commited on
Commit
·
b5a7730
1
Parent(s):
3f62bf3
fix download button
Browse files
app.py
CHANGED
@@ -225,7 +225,7 @@ def infer_geometry(
|
|
225 |
gr.Model3D(value=mesh_seqs[idx], label=f"Frame: {frame_seqs[idx]}") for idx in range(len(frame_seqs))
|
226 |
] + [
|
227 |
gr.Video(value=output_disp_path, label="Disparity", interactive=False),
|
228 |
-
gr.DownloadButton("Download Npz File", value=output_npz_path
|
229 |
]
|
230 |
except Exception as e:
|
231 |
gc.collect()
|
@@ -241,9 +241,6 @@ def infer_geometry(
|
|
241 |
# gr.DownloadButton("Download Npz File", visible=False)
|
242 |
# ]
|
243 |
|
244 |
-
def download_file():
|
245 |
-
return gr.DownloadButton(visible=False)
|
246 |
-
|
247 |
def build_demo():
|
248 |
with gr.Blocks(analytics_enabled=False) as gradio_demo:
|
249 |
gr.Markdown(
|
@@ -332,7 +329,7 @@ def build_demo():
|
|
332 |
label="Disparity",
|
333 |
interactive=False
|
334 |
)
|
335 |
-
download_btn = gr.DownloadButton("Download Npz File"
|
336 |
|
337 |
with gr.Row(equal_height=True):
|
338 |
with gr.Column(scale=1):
|
@@ -433,11 +430,6 @@ def build_demo():
|
|
433 |
],
|
434 |
)
|
435 |
|
436 |
-
download_btn.click(
|
437 |
-
fn=download_file,
|
438 |
-
outputs=download_btn
|
439 |
-
)
|
440 |
-
|
441 |
return gradio_demo
|
442 |
|
443 |
|
|
|
225 |
gr.Model3D(value=mesh_seqs[idx], label=f"Frame: {frame_seqs[idx]}") for idx in range(len(frame_seqs))
|
226 |
] + [
|
227 |
gr.Video(value=output_disp_path, label="Disparity", interactive=False),
|
228 |
+
gr.DownloadButton("Download Npz File", value=output_npz_path)
|
229 |
]
|
230 |
except Exception as e:
|
231 |
gc.collect()
|
|
|
241 |
# gr.DownloadButton("Download Npz File", visible=False)
|
242 |
# ]
|
243 |
|
|
|
|
|
|
|
244 |
def build_demo():
|
245 |
with gr.Blocks(analytics_enabled=False) as gradio_demo:
|
246 |
gr.Markdown(
|
|
|
329 |
label="Disparity",
|
330 |
interactive=False
|
331 |
)
|
332 |
+
download_btn = gr.DownloadButton("Download Npz File")
|
333 |
|
334 |
with gr.Row(equal_height=True):
|
335 |
with gr.Column(scale=1):
|
|
|
430 |
],
|
431 |
)
|
432 |
|
|
|
|
|
|
|
|
|
|
|
433 |
return gradio_demo
|
434 |
|
435 |
|