umuthopeyildirim
commited on
Commit
•
4ab2c91
1
Parent(s):
c9de5c0
Fix image saving bug
Browse files
app.py
CHANGED
@@ -104,12 +104,8 @@ with gr.Blocks(css=css) as demo:
|
|
104 |
print("== Finished processing image")
|
105 |
pred_depth = pred_depth.cpu().numpy().squeeze()
|
106 |
output_image = plt.imsave('depth.png', pred_depth, cmap='jet')
|
107 |
-
print("== Saved image"+str(output_image))
|
108 |
-
tmp = tempfile.NamedTemporaryFile(delete=False)
|
109 |
-
output_image.save(tmp.name)
|
110 |
-
print("== Saved image"+str(tmp.name))
|
111 |
|
112 |
-
return [(original_image,
|
113 |
|
114 |
submit.click(on_submit, inputs=[input_image], outputs=[
|
115 |
depth_image_slider, raw_file])
|
|
|
104 |
print("== Finished processing image")
|
105 |
pred_depth = pred_depth.cpu().numpy().squeeze()
|
106 |
output_image = plt.imsave('depth.png', pred_depth, cmap='jet')
|
|
|
|
|
|
|
|
|
107 |
|
108 |
+
return [(original_image, original_image), output_image]
|
109 |
|
110 |
submit.click(on_submit, inputs=[input_image], outputs=[
|
111 |
depth_image_slider, raw_file])
|