Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,13 +47,8 @@ def process_image(image_path):
|
|
| 47 |
)
|
| 48 |
|
| 49 |
|
| 50 |
-
# Save to temp file as PNG
|
| 51 |
-
temp_file = tempfile.NamedTemporaryFile(delete=False, suffix=".jpg")
|
| 52 |
-
depth_image_padded.save(temp_file.name, format="jpg")
|
| 53 |
-
temp_file.close()
|
| 54 |
-
|
| 55 |
# Return as downloadable file
|
| 56 |
-
return
|
| 57 |
|
| 58 |
|
| 59 |
|
|
@@ -75,7 +70,7 @@ to generate the autostereogram (Magic Eye)
|
|
| 75 |
input_image = gr.Image(type="filepath", label="Input Image")
|
| 76 |
button = gr.Button("Predict")
|
| 77 |
with gr.Column():
|
| 78 |
-
predicted_depth = gr.
|
| 79 |
with gr.Row():
|
| 80 |
autostereogram = gr.Image(label="Autostereogram", type="pil")
|
| 81 |
with gr.Row():
|
|
|
|
| 47 |
)
|
| 48 |
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
# Return as downloadable file
|
| 51 |
+
return depth_image_padded
|
| 52 |
|
| 53 |
|
| 54 |
|
|
|
|
| 70 |
input_image = gr.Image(type="filepath", label="Input Image")
|
| 71 |
button = gr.Button("Predict")
|
| 72 |
with gr.Column():
|
| 73 |
+
predicted_depth = gr.Image(label="Predicted Depth", type="pil")
|
| 74 |
with gr.Row():
|
| 75 |
autostereogram = gr.Image(label="Autostereogram", type="pil")
|
| 76 |
with gr.Row():
|