umuthopeyildirim
commited on
Commit
•
019ef7a
1
Parent(s):
f1ab9e0
Refactor image saving logic in app.py
Browse files
app.py
CHANGED
@@ -105,10 +105,7 @@ with gr.Blocks(css=css) as demo:
|
|
105 |
pred_depth = pred_depth.cpu().numpy().squeeze()
|
106 |
output_image = plt.imsave('depth.png', pred_depth, cmap='jet')
|
107 |
|
108 |
-
|
109 |
-
output_image.save(tmp.name)
|
110 |
-
|
111 |
-
return [(original_image, output_image), tmp.name]
|
112 |
|
113 |
submit.click(on_submit, inputs=[input_image], outputs=[
|
114 |
depth_image_slider, raw_file])
|
|
|
105 |
pred_depth = pred_depth.cpu().numpy().squeeze()
|
106 |
output_image = plt.imsave('depth.png', pred_depth, cmap='jet')
|
107 |
|
108 |
+
return [(original_image, output_image), output_image]
|
|
|
|
|
|
|
109 |
|
110 |
submit.click(on_submit, inputs=[input_image], outputs=[
|
111 |
depth_image_slider, raw_file])
|